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


Joined: 02 Nov 2002
Posts: 27
Location: USA

PostPosted: Tue Feb 03, 2004 5:37 am   

Matching Text from a Trigger
 
I can usually take %1 from a trigger and test to see if it matches, but for some reason it's simply not letting me in this case:

Vial107790%s({empty|an elixir of health})%s(%d)%s(%d)

But here's the problem - When I try to match the "empty" or "an elixir of health" with %1, it simply doesn't match. Here's the pattern:

Code:
#IF (%1 = "empty") {
  #ADDITEM vhealthempty {107790}
  #ECHO {%1 - Empty?}
  #DELITEM vhealth {107790}
  } {
  #ADDITEM vhealth {107790}
  #ECHO {%1 - Full?}
  #DELITEM vhealthempty {107790}
  }

The reason I have the echo is to check to see what ZMud perceives %1 as. Yet, if the vial is empty, it will ECHO empty, yet it doesn't recognize that it's empty, if that makes any sense. It will go through the if statement as if it does not say empty, yet it repeats to me, in an echo, that it IS empty.

Help?
Reply with quote
user0101
Apprentice


Joined: 01 Aug 2003
Posts: 100
Location: USA

PostPosted: Tue Feb 03, 2004 6:17 am   
 
#IF ((%1) = "empty") {
#ADDITEM vhealthempty {107790}
#ECHO {%1 - Empty?}
#DELITEM vhealth {107790}
} {
#ADDITEM vhealth {107790}
#ECHO {%1 - Full?}
#DELITEM vhealthempty {107790}
}
Reply with quote
Jezuit
Beginner


Joined: 02 Nov 2002
Posts: 27
Location: USA

PostPosted: Tue Feb 03, 2004 6:41 am   
 
Thanks for that, who'd have thought one set of parens can make an entire script go FUBAR. I appreciate 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