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
ultimatejackal
Newbie


Joined: 03 Aug 2006
Posts: 1

PostPosted: Thu Aug 03, 2006 2:17 am   

pattern matching with multiple wildcards
 
so I'm a bit new to this all and I'm trying to set up something.

Quote:
#TRIGGER {You whip * through the air in front of %w} {
#if {@tar = %0} {
@rzer = 0
@rzes = 0
}
I'm not quite sure what I would do so %w is recognized as what @tar might be, and not *.

thanks..
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Aug 03, 2006 2:27 am   
 
You need to surround the %w in parenthesis to tell zMUD that it should remember the value it matched for that wildcard. Example:

You whip * through the air in front of (%w)

Also, the pre-defined variables for accessing what zMUD matched with pattern wildcards start at %1 not %0. So use that instead.
_________________
Kjata
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