All right I think I've gotten myself into a bit a hole here. I have a very long and hard-on-the-eyes if..then..else statement in a script that comes up with an error, but I can't even see what the error is because it goes off the side of the screen when the message appears (black block at the top of the screen).
What I'm trying to do is get a bunch of squads of WW2 Finnish soldiers to move (retreat) to a waypoint when all their friendly MG and AT-guns die and the Russians are within range. Detecting the casualties and the Russians works fine, but the following script does not. I'm using a script to do this mainly because in order for the AI to fight standing up and in proper formation I've used doStop and setUnitpos commands. (The script below does not have the neccisary doFollow to override the doStop, I'm aware of this and will add it once I get this problem sorted out). Not only that but there are two waves of attack and I want the Finns to retreat regardless of which wave is overrunning them, so I need the objectives to reflect the progress of the battle, which is why the script itself checks Russian casualties to see if the first wave has been killed off.
if ( not alive leader platoon1sqd1 and not alive leader platoon1sqd2 and not alive leader platoon1sqd3 and not alive leader platoon1sqd4 and not alive tank1 and not alive tank2)
then [{"2" ObjStatus "FAILED"},{leader Finn1 doMove getMarkerPos "finn1ret"}, {leader Finn2 doMove getMarkerPos "finn2ret"},{leader Finn3 doMove getMarkerPos "finn3ret"},{leader Finn4 doMove getMarkerPos "finn4ret"}]
else [{"1" ObjStatus "FAILED"},{leader Finn1 doMove getMarkerPos "finn1ret"}, {leader Finn2 doMove getMarkerPos "finn2ret"},{leader Finn3 doMove getMarkerPos "finn3ret"},{leader Finn4 doMove getMarkerPos "finn4ret"}]
My real question here is, can you even have multiple conditions following the If? The structure I'm using is basically If not bla and not bla and not bla and not bla then {bla,bla,bla,bla} else {bla,bla,bla,bla}