When I use this command I get the following error:
Bad Data in Module: Aide de Camp [Set Global Property - Turn] - Unable to locate Global Property in Named Map. Property Expression=[{gp_Turn}], Property Name=0].
I have tried with the default “Current Zone/Current Map/Module” and I have not decoded how to use the expression builder to enter the correct property when select the non default value.
Global Property is in the Global Properties folder
Here are the setting:
[Global Properties]
gp_Phase
initial value: 0
It is numeric
Min value 0
Max value 8
It is wrap around
Set Global Property (which is part of a piece in an At-Start Stack)
Global Property Name {gp_Phase}
Located Property … Current Zone/Current Map/Module
It is numeric
Min value 0
Max value 8
It is wrap
Key Command CTRL+P
Type Increment numeric value
Increment by 1
I have not change any other setting for this action; I an not sure if I now need to set a switch in map or somewhere.
Ok… try putting quotes around the property name, thus {“gp _Phase”}
Curly braces invokes the beanshell expression parser and that works differently from legacy mode as to how property names are handled. Without the quotes, vassal is trying to find a property with the name of whatever the content of gp_Phase is. In hindsight, I can see this from the original error message where you intended the property name to be gp_Turn, which had a value of zero (0). Vassal was looking for a property with a name “0”.
Mark
Sorry for the delay. I went on the trip and got Covid. Was in quarantine, etc. Finally back to normal. Your suggestion of {“name”} worked. Thank you sir.