|
Shalafi Newbie
Joined: 05 Jul 2002 Posts: 1
|
Posted: Fri Jul 05, 2002 5:32 pm
Evaluating expressions with strings |
I'm having some difficulty with a zMUD trigger I've been working on and I can't seem to find an adequate answer in the helpfile (I'm probably looking in the wrong places, the helpfile is huge).
Here's the hitch ... I have an #if statement that checks the following expression:
#if @state=~*eb* {true} {false}
The @state variable is parsed from the MUD command prompt and tells you various things about your character. It is a string of letters, sometimes with a whitespace in between them. When eb occurs in it, it's always side by side like that. But those wildcard symbols next to the eb don't seem to take. How do I write it so it searches the string @state and looks for the "eb" pair, no matter what is to the left or right of it?
- Shalafi |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Jul 05, 2002 6:56 pm |
#IF (%pos("eb",@state)) {true} {false}
LightBulb
Senior Member |
|
|
|
Charbal GURU
Joined: 15 Jun 2001 Posts: 654 Location: USA
|
Posted: Sat Jul 06, 2002 9:13 am |
I agree with Lightbulb's solution, but for future reference, the syntax for your command should be something like:
#if (@state =~ "*eb*") {true} {false}
- Charbal |
|
|
|
|
|