Trouble with LUA / Activation & Deactivation of No-Navigation Zones
Posted: Fri Jun 09, 2017 6:17 am
Hi guys,
I'm having trouble with a LUA instruction for an Action that deactivates an existing and active No-Navigation Zone.
What i found in CMANO manuals and sample scripts is as follows:
mySide = VP_GetSide({Name=”US”})
myZone = mySide:getnonavzone(“AAW Zone 1”)
myZone.isactive = ”False”
In my Scenario case, the script would be as follows, for an Action deactivating the initially activated No-Navigation-Zone defined for "DPRK" side units on Chinese Territory (the No-Navigation Zone is called "PRCSOVEREIGN"), once the side "PRC" has been attacked and the Mutual Defence Agreement between the two countries/Sides enters into effect:
mySide = VP_GetSide({Name=”DPRK”})
myZone = mySide:getnonavzone(“PRCSOVEREIGN”)
myZone.isactive = ”False”
The problem is... when i test this LUA Script in the Script Console, it returns ERROR based on a character position (148) which does not even exist, since the script is apparently not so long.
What'd be the right scripting?
Thanks a (metric)Ton in advance for your help!
Fernando.
I'm having trouble with a LUA instruction for an Action that deactivates an existing and active No-Navigation Zone.
What i found in CMANO manuals and sample scripts is as follows:
mySide = VP_GetSide({Name=”US”})
myZone = mySide:getnonavzone(“AAW Zone 1”)
myZone.isactive = ”False”
In my Scenario case, the script would be as follows, for an Action deactivating the initially activated No-Navigation-Zone defined for "DPRK" side units on Chinese Territory (the No-Navigation Zone is called "PRCSOVEREIGN"), once the side "PRC" has been attacked and the Mutual Defence Agreement between the two countries/Sides enters into effect:
mySide = VP_GetSide({Name=”DPRK”})
myZone = mySide:getnonavzone(“PRCSOVEREIGN”)
myZone.isactive = ”False”
The problem is... when i test this LUA Script in the Script Console, it returns ERROR based on a character position (148) which does not even exist, since the script is apparently not so long.
What'd be the right scripting?
Thanks a (metric)Ton in advance for your help!
Fernando.