HI there.
I'm scripting a MP C&H scenario with lots of flags to conquer.
The Server manages the status of the flags and needs to tell the clients the latest info. 1 script runs for 1 flag, with the number of the flag as a parameter.
Problem is: when writing the flagscript you dunno what number this script gets at runtime.
Therefore you need to script in a way that every number produces valid code. Like this:
?(_trigger_nr == 1):publicVariable "side_1"
?(_trigger_nr == 2):publicVariable "side_2"
?(_trigger_nr == 3):publicVariable "side_3"
?(_trigger_nr == 4):publicVariable "side_4"
?(_trigger_nr == 5):publicVariable "side_5"
?(_trigger_nr == 6):publicVariable "side_6"
?(_trigger_nr == 7):publicVariable "side_7"
However, it could be replaced with this much better code:
call format[{publicVariable "side_%1"},_trigger_nr]
Problem is: it produces no errors, but i dunno if it would work over a real network (LAN). Has somebody experiences with this situtation ? Or could test it ?