Community Forum

TipTriggers

Forum Overview >> Scripting

CategoryScripting
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
z=z+1;
print("TipTrigger: " .. tostring(z));
print(tostring(k) .."("..type(v)..")="..tostring(v));
for i,j in pairs(g_currentMission.tipTriggers[k]) do
print(tostring(i).."("..type(j)..")="..tostring(j));
end;
end;

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.