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
Belmyrddyn
Magician


Joined: 17 Oct 2001
Posts: 371
Location: USA

PostPosted: Sun Dec 09, 2001 6:43 pm   

Unknown Amounts
 
Is there a way to check for more than word, and save those words to seperate variables? The thing I'm trying to do is basically take something vaguely like this:
Obvious paths: north, east, west.
and pass it to the #TAG function for tagging it as the exit line. However it *could* look like this:
Obvious exits: northeast, southwest.
It doesn't seem to pick it up. I'm using this trigger so far;
#TRIGGER {Obvious %w~: (*)} {#TAG {exit} {%1}}

Any thoughts?

Belmyrddyn
Reply with quote
Belmyrddyn
Magician


Joined: 17 Oct 2001
Posts: 371
Location: USA

PostPosted: Sun Dec 09, 2001 7:23 pm   
 
Fiddling with it a lil (going into incredibly wacky string manipulation techniques and some of the more bizare functions), I discover that when testing the trigger, it'll pick up the first exit but when it hits the comma (north, east, west) it stops. So instead of picking up north, east, west like I want it to, it just picks up north. I'm using just a * to pick up the string.

Belmyrddyn
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Dec 10, 2001 2:26 am   
 
to capture characters used by ZMud for special purposes, use the %* wildcard.

li'l shmoe of Dragon's Gate MUD
Reply with quote
Acaila
Apprentice


Joined: 30 Aug 2001
Posts: 187
Location: Netherlands

PostPosted: Mon Dec 10, 2001 7:41 am   
 
As far as I know a comma isn't a special character. But to capture multiple words in a variable all you need to do is quote the %1.

#TRIGGER {Obvious %w~: (*)} {#TAG {exit} {"%1"}}

Acaila
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