ok, you scripting guru's out there, i'll tell ya what i have and then where the problem is.
first i have a trigger, Cond: true On Act: tankdead = 0
it's an init trigger which sets the global variable to 0 at mission start
second, i have a trigger which calls a script from mission start, so it's Cond is also: true, in the On Activation field i put: [this] exec "tanksdestroyed.sqs"
this will call the following script, which is supposed to get the dammage status of 4 tanks.
;tanksdestroyed.sqs
#loop
_dam1 = getdammage T1
_dam2 = getdammage T2
_dam3 = getdammage T3
_dam4 = getdammage T4
?(_dam1 >= 0.7) AND (_dam2 >= 0.7) AND (_dam3 >= 0.7) AND (_dam4 >= 0.7): goto "next"
?(_dam1 >= 0.7): T1 setdammage 1
?(_dam2 >= 0.7): T2 setdammage 1
?(_dam3 >= 0.7): T3 setdammage 1
?(_dam4 >= 0.7): T4 setdammage 1
~2
goto "loop"
#next
tankdead = 1
deletevehicle T1
deletevehicle T2
deletevehicle T3
deletevehicle T4
exit
;end of Script
as you m8 see, the scripts get the dammage status of each Tank (T1 to T4), when a tank is dammaged more than 0.7 it will destroy it completely. As long not ALL tanks are dammaged that heavy, script should loop back to the beginning, and when ALL 4 tanks are dammaged more than 0.7 it should delete the tanks and set the global variable "tankdead" to 1.
as far as good, till now all seems to work perfectly (at least i didn't got any error messages)
next thing i have is another trigger which should createvehicle Inf's and/or tanks (these scripts are already tested out and work without any error so i wont bother you to post these scripts too)
The trigger Cond is: (tankdead == 1) AND (time >= 100)
This should (as far as i know) activate the trigger when tankdead is set to 1 by the script above AND the mission already runs at least 100 seconds. in the on activation box i just call the script which createvehicles the stuff i need.
Now to the error i got. When the tanks are destroyed it says ¦#¦ error in expression
but no further information in which line trigger or script it is.
I've checked all the syntax i already know, especially the calls for these createvehicle scripts so i can say, the error must be somewhere else.
Since i didn't add other scripts or triggers or anything else except the things above, the error must be somewhere in there, but i can't figure out where.
If you guys could take a look onto it i would be very happy...
thx alot guys