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
bkarasek
Beginner


Joined: 01 Jul 2002
Posts: 17
Location: USA

PostPosted: Mon Aug 18, 2003 2:31 pm   

IF with a string list
 
I have a string list variable called @instrument. This variable will contain, at any one moment, two separate words. In this example, It will contain "Drum" and "Flute," represented as Drum|Flute.

I have an alias to play a song which requires that I have a Flute wielded. I also have an alias to wield said flute. I want the song playing alias to first check the @instrument variable to see if it contains "Flute" in the list.

If "Flute" is contained in the variable list, then the song playing alias should play the song. If "Flute" is NOT contained in the variable list, then the song playing alias should execute the get flute alias and THEN play the song. I can't figure how to get the IF to reference the WHOLE string list, rather than just a single variable. Any help?
Reply with quote
Anabasis
Wanderer


Joined: 26 Jan 2001
Posts: 74

PostPosted: Mon Aug 18, 2003 2:53 pm   
 
Check out the %ismember function in the help files.

Ana
Reply with quote
bkarasek
Beginner


Joined: 01 Jul 2002
Posts: 17
Location: USA

PostPosted: Mon Aug 18, 2003 3:56 pm   
 
Brilliant, thank you. Got it set as I had wanted it.
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