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
edz16
Newbie


Joined: 12 Dec 2001
Posts: 2

PostPosted: Wed Dec 12, 2001 11:25 pm   

variable help
 
how do I set a variable in an if statement?
I have an alias vamp and variable V. When I type the alias I want it to do the following:
if v=no rem longsword;rem longsword;v=yes
if v=yes wield longsword;wield longsword;v=no
but I cant figure out how to set my V variable to yes or no in the if statement. Its just a syntax problem but i could use some help
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Thu Dec 13, 2001 1:27 am   
 
The #IF command has the syntax:

#IF (condition) {commands if true} {commands if false}

#ALIAS vamp {
#IF (@V = "yes") {wield longsword; wield longsword; #VAR V "no"} {rem longsword; rem longsword; #VAR V "yes"}
}

Troubadour
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