Jump to content
Sign in to follow this  
jubbie

Scripting help

Recommended Posts

Hullo

Anyone help me with this?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

if (sendtroops=true) then goto "start"

if (sendtroops=false) then goto "no"

#start

group1 domove getpos tank

goto "end"

#no

tank sidechat"You have to send the troops first"

goto "end"

#end

exit

Basically I'd very much like to have two options - the troops go where they're told or the troops inform the player that they can't go because they haven't been told where to go. Sendtroops=true means the player has told the troops where to move. Sendtroops=false means the player did not.

When I run the script I get an "Unknown Operator" error that looks like "Sendtroops|#|=true" : Error Unknown Operator.

Any ideas? confused_o.gif

Share this post


Link to post
Share on other sites

Totally wrong used syntax, check the comref for spelling wink_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?!(sendtroops) : goto "no"

group1 domove getpos tank

goto "end"

#no

tank sidechat"You have to send the troops first"

#end

exit

What ofp means with it's error is that you need TWO = for comparison, your lines would corrected be:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(sendtroops==false) then {goto "no"}

which can be solved much easier as you can see in my example.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×