I am using C#, NLua and SFML.net.
I have a lua script which is causing Stack Overflow exceptions... but I am not recursing in anyway...
Here is the lua script:
import('RLWorld','RLWorld.Systems')
import('RLWorld','RLWorld.Components')
import('RLWorld','RLWorld.Entities')
import('RLWorld','RLWorld.Entities.RequestData')
function OnCollider(sysman, ent1, ent2)
if (sysman:LUAHasComponent('EntranceComponent',ent2)) then
sysman:LogToConsole('Bumped into an Entrance');
eComp=sysman:LUAGetComponent('EntranceComponent',ent2);
if eComp.Coords=='' then
sysman:LogToConsole("Empty cords. Go up a level.");
sysman:SetCords(sysman:GetSuperCords());
else
sysman:LogToConsole('Creating dungeon tilemap');
-- sysman:LogToConsole(eComp.Coords .. "abc" .. "QRD");
pLoc=sysman:LUAGetComponent('LocationComponent',ent1);
nxtCord=eComp.Coords .. ":[";
nxtCord=nxtCord .. pLoc.TileLocation.X;
nxtCord=nxtCord .. ",";
nxtCord=nxtCord .. pLoc.TileLocation.Y;
sysman:LogToConsole(nxtCord);
--sysman:LogToConsole(pLoc.TileLocation.Y);
--sysman:LogToConsole(eComp.Coords .. ":[" .. (pLoc.TileLocation.X) .. "," .. (pLoc.TileLocation.Y));
--sysman:LogToConsole --..","..pLoc.TileLocation.Y.."]");
--nxtCord=eComp.Coords..":[";
--sysman:LogToConsole(nxtCord);
--nxtCord=nxtCord..pLoc.TileLocation.X
--sysman:LogToConsole(nxtCord);
--nxtCord=nxtCord..","
--sysman:LogToConsole(nxtCord);
--nxtCord=nxtCord..pLoc.TileLocation.Y
--sysman:LogToConsole(nxtCord);
--nxtCord=nxtCord.."]:[5,5]";
--sysman:LogToConsole(nxtCord);
--sysman:SetCords();
end
depth=sysman:CordDepth();
if (depth==1) then
sysman:LogToConsole('Creating GlobalTilemap');
iState=GlobalTilemapGameState();
end
if (depth==2) then
iState=LocalTilemapGameState();
sysman:LogToConsole('Creating LocalTilemap');
end
if (depth>2) then
iState=MinimalTilemapGameState();
sysman:LogToConsole('Creating MinimalTilemap');
end
sysman:LogToConsole('Setting run result');
--iState:Load();
rr=GamestateRunResult(eComp.Result,iState);
sysman:NameObject('RunResult',rr);
return;
end
actionData=ActionInputRequest('TRIGGER_AB1',nill);
request = Request.CreateRequest('ActionInput',ent1, actionData);
sysman:AddRequest(request);
--r=sysman:LUAGetComponent('RenderComponent',ent2);
--r.Visible=not r.Visible;
return;
end
The exception occurs when this bit of script is ran (I will number these lines)