For a given unit, I'm trying to write a script to check if a given option has been selected, and if so, uncheck another option and disable the option so the user cannot select it (unless Option A is unselected)
Also, would I do that in a postlink script, or is there a better place?
The code above doesn't work. I get an error at compile time
Line 10 is the .selection line.
Also, would I do that in a postlink script, or is there a better place?
Code:
~ If bike is selected, loose Move through cover
if (option[gnKT_Bike].selection > 0) then
option[gn6_MTC].selection = 0
option[gn6_MTC].enablement = 0
endif
Code:
Army Builder was forced to stop compilation after the following errors were detected:
Syntax error in 'postlinks' script for unit 'ba3_SSgt' on line 10
-> Attempt to assign value to read-only identifier
'postlinks' script for unit 'ba3_SSgt' performs selection on invalid option (or chain)
Last edited: