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


Joined: 14 Jul 2003
Posts: 5

PostPosted: Mon Jul 10, 2006 3:09 pm   

Room exits to variable
 
I would like to capture existing room exits to a variable, the mud I am on uses the follow format:

Obvious exits: -N -S -E -W

I have tried #tr {Obvious exits: (*)} {#var exits %1} this will only capture -N. I would like exits to be -N -S -E -W.

How do I create at pattern to grab everything in that line?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Jul 10, 2006 3:29 pm   
 
zMUD replaces the %1 with the exact text that was matched before running this script. In this case, this means that your #VAR command would end up something like this:

#VAR exits -N -S -E -W

This is incorrect syntax for the #VAR command and confuses zMUD. What you need to do is to surround the %1 with curly braces, like {%1}, to let zMUD know that all of that goes together.
_________________
Kjata
Reply with quote
eyeshade
Newbie


Joined: 14 Jul 2003
Posts: 5

PostPosted: Mon Jul 10, 2006 3:36 pm   
 
worked like a charm, I never knew that about the #var command Ill keep it in mind in the future. Thanks!
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