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
rtatum
Novice


Joined: 19 Sep 2004
Posts: 45
Location: Houston

PostPosted: Sat Oct 30, 2004 1:57 am   

If something is equal to...
 
What's the proper way of doing a check to see if something is equal to a, or b, or c...I've tried a few things like

#IF ("%1"=a|b|c) {Then do stuff} {Else this stuff}

But it didn't seem to work...
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat Oct 30, 2004 2:12 am   
 
#IF (("%1"=a OR "%1"=b) AND "%2"=c)

remember to group your AND OR NOT etc statements like you would math experssions
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Oct 30, 2004 12:32 pm   
 
You can also use %ismember as a shortcut in this case.
#IF (%ismember("%1","a|b|c")) {true stuff} {false stuff}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
rtatum
Novice


Joined: 19 Sep 2004
Posts: 45
Location: Houston

PostPosted: Sat Oct 30, 2004 6:39 pm   
 
I didn't even think about using ismember, oh well, I did it the long way, but it works fine, thanks Vijilante
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