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
vileplume
Novice


Joined: 26 Dec 2001
Posts: 43
Location: USA

PostPosted: Tue May 14, 2002 4:37 am   

Another question about the #SUB command
 
I followed the example given in the help file on #SUB to shorten "someone tells you" to "someone:" I did it verbatim out of the example which goes like this:

#TRIGGER {(*) tells you,} {#sub {%1:}}

It seems to basically work, except it wraps the text that they are telling me in a very strange way. It does something like this:

Someone tells you: You
seem to be having a lot of trouble using this command.

It only puts the first word of what they say after the colon, then skips a line before continuing the text...what's happening here?

PS I have zmud 6.24 in case that matters.

Thanks
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue May 14, 2002 5:24 am   
 
Be sure the trigger phrase matches your MUD's syntax. For this to work, your MUD would have to send something like:

Someone tells you, "You seem to be having a lot of trouble using this command."

And you would then see:

Someone: "You seem to be having a lot of trouble using this command."

From the sample you provided, it appears that your MUD may be using a : instead of a , and omitting the "'s. The "'s don't matter, but the : and , do.

LightBulb
Vague questions get vague answers
Reply with quote
vileplume
Novice


Joined: 26 Dec 2001
Posts: 43
Location: USA

PostPosted: Tue May 14, 2002 12:47 pm   
 
Upon closer inspection, I notice that it actually uses a ; instead of a ,. I replaced the , with the ; but still got the same result. Could this be another case of a special character issue? If so, should I tell it to match the pattern with ;; even though it actually only contains one ; in the line I'm trying to match?

Thanks for your help!
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue May 14, 2002 5:03 pm   
 
Yes, this is a special-character issue. zMUD uses ; to indicate the end of a line. This allows you to issue multiple commands on the same line -- get apple;eat apple;spit appleseeds. In this case, you'll need to precede it with a ~ so it doesn't tell zMUD to end the trigger early.

#TR {(*) tells you~;} {#SUB {%1:}}

LightBulb
Vague questions get vague answers
Reply with quote
vileplume
Novice


Joined: 26 Dec 2001
Posts: 43
Location: USA

PostPosted: Wed May 15, 2002 4:17 am   
 
Thanks so much for your advice! Now back to the drawing board for me.
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