Home   Help Search Login Register  

Author Topic: C and H script  (Read 1234 times)

0 Members and 1 Guest are viewing this topic.

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
C and H script
« on: 29 Oct 2003, 23:59:42 »
I keep getting multiple errors with the following script, and I have tried everything I can think of!  westhere/easthere/reshere and set to 1 or 0 from present/notpresent triggers:

?!(local server):goto "end"
westscore==0
eastscore==0
resscore==0
#start
?(westhere== 1) and (easthere== 0) and (reshere== 0):goto "westscore"
?(easthere== 1) and (westhere== 0) and (reshere== 0):goto "eastscore"
?(reshere== 1) and (easthere== 0) and (westhere== 0):goto "resscore"
?(westhere== 1) and (easthere== 1) and (reshere== 1):goto "start"
?(westhere== 0) and (easthere== 0) and (reshere== 0):goto "start"

#westscore
westscore=westscore+1
~5
titletext[format["MISSION STATUS:\nNATO  %1 <-> Soviets  %2 <-> Resistance %3",westscore,eastcore,resscore],"PLAIN DOWN"]
goto "start"
#eastscore
eastscore=eastscore+1
~5
titletext[format["MISSION STATUS:\nNATO  %1 <-> Soviets  %2 <-> Resistance %3",westscore,eastcore,resscore],"PLAIN DOWN"]
goto "start"
#resscore
resscore=resscore+1
~5
titletext[format["MISSION STATUS:\nNATO  %1 <-> Soviets  %2 <-> Resistance %3",westscore,eastcore,resscore],"PLAIN DOWN"]
goto "start"
#end
exit

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:C and H script
« Reply #1 on: 30 Oct 2003, 00:25:36 »
ok I fixed all the original errors with the following, but now the score shows scalar array instead of a number, any ideas?
?!(local server):goto "end"
westscore==0
eastscore==0
resscore==0
#start
?westhere and !easthere and !reshere:goto "westscore"
?easthere and !westhere and !reshere:goto "eastscore"
?reshere and !easthere and !westhere:goto "resscore"
?westhere and easthere and reshere:goto "start"
?!westhere and !easthere and !reshere:goto "start"
?westhere and easthere or reshere:goto "start"
?easthere and westhere or reshere:goto "start"
?reshere and westhere or reshere:goto "start"
goto "start"
#westscore
westscore=westscore+1
~5
titletext[format["MISSION STATUS:\nNATO  %1 <-> Soviets  %2 <-> Resistance %3",westscore,eastcore,resscore],"PLAIN DOWN"]
goto "start"
#eastscore
eastscore=eastscore+1
~5
titletext[format["MISSION STATUS:\nNATO  %1 <-> Soviets  %2 <-> Resistance %3",westscore,eastcore,resscore],"PLAIN DOWN"]
goto "start"
#resscore
resscore=resscore+1
~5
titletext[format["MISSION STATUS:\nNATO  %1 <-> Soviets  %2 <-> Resistance %3",westscore,eastcore,resscore],"PLAIN DOWN"]
goto "start"
#end
exit

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:C and H script
« Reply #2 on: 30 Oct 2003, 00:37:20 »
ok, I hammered all the bugs out.  This works like I wanted.  Feel free to use it yorself for a king of the hill mission, but please acknowledge the {USI} Studios if you do!

;
;Place Documentation here
;author USI Studios
;created 10/29/03 3:42:11 PM
;________________________
;::::::::::::::::::::::::
?!(local server):goto "end"
_westscore=0
_eastscore=0
_resscore=0
#start
?westhere and !easthere and !reshere:goto "westscore"
?easthere and !westhere and !reshere:goto "eastscore"
?reshere and !easthere and !westhere:goto "resscore"
?westhere and easthere and reshere:goto "start"
?!westhere and !easthere and !reshere:goto "start"
?westhere and easthere or reshere:goto "start"
?easthere and westhere or reshere:goto "start"
?reshere and westhere or reshere:goto "start"
goto "start"
#westscore
_westscore=_westscore+1
~5
titletext[format["MISSION STATUS:\nNATO  %1 <-> Soviets  %2 <-> Resistance %3",_westscore,_eastscore,_resscore],"PLAIN DOWN"]
goto "start"
#eastscore
_eastscore=_eastscore+1
~5
titletext[format["MISSION STATUS:\nNATO  %1 <-> Soviets  %2 <-> Resistance %3",_westscore,_eastscore,_resscore],"PLAIN DOWN"]
goto "start"
#resscore
_resscore=_resscore+1
~5
titletext[format["MISSION STATUS:\nNATO  %1 <-> Soviets  %2 <-> Resistance %3",_westscore,_eastscore,_resscore],"PLAIN DOWN"]
goto "start"
#end
exit