Community Forum


Forum Overview >> Scripting

Created19.11.2010 17:50

Linus Ek (Unknown) 19.11.2010 17:55
Hey there.

I'm trying to convert a mod from FS2009 to FS2011 and got stuck at one part.

g_currentMission.tipTriggers is an empty table. It shouldnt be empty right? I'm testing on a modded default map.

For an example : print(tostring(table.maxn(g_currentMission.tipTriggers)))
prints 0

Okey after some more testing I figured out that it isnt empty. But I cant count it. I tried with table.getn too..

Andreas GroƟschedl (Unknown) 19.11.2010 22:20
Try this to find out more:

local z=0;
for k,v in pairs(g_currentMission.tipTriggers) do
print("TipTrigger: " .. tostring(z));
print(tostring(k) .."("..type(v)..")="..tostring(v));
for i,j in pairs(g_currentMission.tipTriggers[k]) do

Linus Ek (Unknown) 20.11.2010 12:41
Yeah, found a similar function that solved my problem.

Thanks. :)

Note: Log in to post. Create a new account here.