Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
neuch
Newbie


Joined: 02 Jan 2004
Posts: 4
Location: Canada

PostPosted: Fri Jan 02, 2004 1:19 am   

variable adding
 
i made a counter to add to 3 then enter a command (using an if statement). so once the variable is 3 it sends the "true" command and if not it sends the "false" command. now i need it to go back to 0 once the "true" command is inputed. ive tried making the variable 0 but after that it doesnt seem to add. is there anything im doing wrong, is there a reset command i could use or something. please help
[?]
Reply with quote
Toetag
Magician


Joined: 10 Oct 2000
Posts: 356
Location: USA

PostPosted: Fri Jan 02, 2004 2:49 am   
 
Can you copy your commands for us? I've never had a problem with just going: variable = 0 and then adding to it later on.
Reply with quote
neuch
Newbie


Joined: 02 Jan 2004
Posts: 4
Location: Canada

PostPosted: Fri Jan 02, 2004 8:42 am   
 
ok. so first this trigger doesnt add when it is supposed to, but the res works

#AD count 1;say demon, fly;#IF (@count = 3) {@marco = bind;bind} {gdemon}

and then when i try this it goes back to 0 but the variable doesnt work.

@marco = sword;sword;@count = 0

although everything will work fine the first time tested but after that its another fight
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Fri Jan 02, 2004 5:28 pm   
 
When setting a variable with VariableName=Value, you do NOT have a @ in front of it.
So: Marco = bind;bind
And: Marco=sword;sword;count=0
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net