ScenEdit_AddZone fails in LUA Console?
Posted: Sun Aug 13, 2017 11:33 pm
Hi
I am running Command V12.12 Build936.21, Running in Steam Mode
I have a problem trying to create an exclusion zone from the LUA Console (use case is modelling an Economic Exclusion Zone, with many RPs to be created from LUA). The problem occurs in even the hand-crafted 4 RP case.
my code looks like:
and the print statements shows what I expect, but I get the error pop-up, and LUA error
Is there some attribute I should be setting in the RP, so I can use them in a Zone to be created from LUA?
Thanks in advance
I am running Command V12.12 Build936.21, Running in Steam Mode
I have a problem trying to create an exclusion zone from the LUA Console (use case is modelling an Economic Exclusion Zone, with many RPs to be created from LUA). The problem occurs in even the hand-crafted 4 RP case.
my code looks like:
Code: Select all
local points = ScenEdit_GetReferencePoints({side="ADF", area={"X1", "X2", "X3", "X4"}})
print(points)
local tt={description='EEZ', isactive=true, area=points, affects={'Aircraft','Ship'}, markas='Hostile'}
print(tt)
ScenEdit_AddZone('ADF', 1, tt)
Code: Select all
ScenEdit_AddZone 5 : ,Error in RP!
Thanks in advance