Lua GetLoadout Roles

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
Parel803
Posts: 932
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

Lua GetLoadout Roles

Post by Parel803 »

Goodevening,

This:
local l = ScenEdit_GetLoadout ({name='testLOweather', guid='KO61QJ-0HN9Q2IEBCB5B'})
print (l.roles)

Gives:
{ TOD = 0, role = 2007, weather = 0 }

Shouldn't TOD and weather be giving a number iaw: https://commandlua.github.io/assets/Dat ... tTimeOfDay

If I'm doing something wrong, apologise.

regards GJ
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: Lua GetLoadout Roles

Post by michaelm75au »

The database being used by scenario might not have the values. '0' usually means there is no values for that loadout.
I tried it on a scenario based on a DB from 12 months ago and it showed the '0's, but when I migrated it to the latest DB, the expected values showed up
Michael
Parel803
Posts: 932
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

Re: Lua GetLoadout Roles

Post by Parel803 »

Micheal,

Thank you for your time and answer, I'll check.

Updated my save to DB3K 510 got:
>> local l = ScenEdit_GetLoadout ({name='F-7M Fishcan [MiG-21 Copy]', guid='9V11D5-0HN9B6VO7NOL9'})
print (l.roles)
{ TOD = 0, weather = 0, role = 3001 }

Made a small new scen with DB 510 got:
>> local l = ScenEdit_GetLoadout ({name='F-7B Fishcan [MiG-21 Copy]', guid='KO61QJ-0HNA96CVNJG87'})
print (l.roles)
{ TOD = 2003, weather = 2002, role = 3001 }

Not sure yet what I did incorrect but oké. I now know it is oke in a new scen.
And solved after deep re-build :-) Thx again

regards GJ
Post Reply

Return to “Tech Support”