|
bkarasek Beginner
Joined: 01 Jul 2002 Posts: 17 Location: USA
|
Posted: 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? |
|
|
|
Anabasis Wanderer
Joined: 26 Jan 2001 Posts: 74
|
Posted: Mon Aug 18, 2003 2:53 pm |
Check out the %ismember function in the help files.
Ana |
|
|
|
bkarasek Beginner
Joined: 01 Jul 2002 Posts: 17 Location: USA
|
Posted: Mon Aug 18, 2003 3:56 pm |
Brilliant, thank you. Got it set as I had wanted it.
|
|
|
|
|
|
|
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
|
|