OK I've tried my script in every way possible! I can't find what's wrong. Then again, I'm not very good at this. Duck at the forums on ofp.info helped me with the initial event handle things.
Here's the deal, I have a three side Team DM mission. What this script is supposed to do is to find out who killed who, and award each side the correct score. WestScore, EastScore and ResScore are all predefined in my init.sqs and has the value 0.
I put this in the init on the players
this AddEventHandler ["killed",{_this exec "killed.sqs"}]
Here is my script, killed.sqs
_killedguy = _this select 0
_killer = _this select 1
?(side _killer == west AND side _killedguy == east): goto "West1"
?(side _killer == west AND side _killedguy == guer): goto "West2"
?(side _killer == east AND side _killedguy == west): goto "East1"
?(side _killer == east AND side _killedguy == guer): goto "East2"
?(side _killer == guer AND side _killedguy == west): goto "Res1"
?(side _killer == guer AND side _killedguy == east): goto "Res2"
exit
#West1
WestScore = WestScore + 1
titleText ["West-East score!", "PLAIN DOWN", 0.5]
playSound "UCapture"
goto "end"
#West2
WestScore = WestScore + 1
titleText ["West-Res score!", "PLAIN DOWN", 0.5]
playSound "UCapture"
goto "end"
#East1
EastScore = EastScore + 1
titleText ["East-West score!", "PLAIN DOWN", 0.5]
playSound "UCapture"
goto "end"
#East2
EastScore = EastScore + 1
titleText ["East-Res score!", "PLAIN DOWN", 0.5]
playSound "UCapture"
goto "end"
#Res1
ResScore = ResScore + 1
titleText ["Res-West score!", "PLAIN DOWN", 0.5]
playSound "UCapture"
goto "end"
#Res2
ResScore = ResScore + 1
titleText ["Res-east score!", "PLAIN DOWN", 0.5]
playSound "UCapture"
goto "end"
;the title text at END is just for debugging
#end
~1
titleText ["false", "PLAIN DOWN", 0.5]
exit
Nothing happens when people shoot each other. If I remove the EXIT after
?(side _killer == west AND side _killedguy == east): goto "West1"
?(side _killer == west AND side _killedguy == guer): goto "West2"
?(side _killer == east AND side _killedguy == west): goto "East1"
?(side _killer == east AND side _killedguy == guer): goto "East2"
?(side _killer == guer AND side _killedguy == west): goto "Res1"
?(side _killer == guer AND side _killedguy == east): goto "Res2"
it goes directly to #West1 and then to #end, no matter who shot who.
I have no idea how to fix this. Please help!