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


Joined: 08 Feb 2002
Posts: 8

PostPosted: Sun Feb 10, 2002 7:59 pm   

Triggers with special characters ([ ] & % etc)
 
From time to time one of my triggers gets sent a line that holds one of zMUD's special characters. zMUD tells me it cannot parse the string because of it. How can I get it to parse the lines that have one of zMUD's reserved characters in it?

A typical error-line looks like this

an some stupid item & it's contents is...yada yada yada...Where "some stupid item & it's contents" is getting loaded into %1 and acted upon.

I hope I'm being clear. Thanks in advance.
Reply with quote
Kaputchnik
Beginner


Joined: 06 Jan 2002
Posts: 28
Location: Sweden

PostPosted: Sun Feb 10, 2002 9:38 pm   
 
Not sure if I understood you correct but try this:


#trigger {You see a small bag ~& its content is: (%w)}


Then zMUD won't parse the special characters as an internal command, if you put a ~ before the charcaters you want to have in the trigger pattern.

Cheers,
Kaputchnik
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: Mon Feb 11, 2002 12:04 am   
 
If you are using * in your trigger pattern, use %*.

%* can match all characters.

 - Charbal
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Feb 11, 2002 1:13 am   
 
If the trigger will never be dealing with wildcards or special characters (ie, you see %d coins here) as they were intended to be used, you can safely turn the trigger into a VERBATIM trigger.

That means that this pattern:

This* sucks

will match this line character for character:

This* sucks

but will not match something like this:

Thisannoyinglylongword sucks

li'l shmoe of Dragon's Gate MUD
Reply with quote
Ziandrox
Newbie


Joined: 08 Feb 2002
Posts: 8

PostPosted: Mon Feb 11, 2002 7:16 am   
 
I didn't think I explained it well enough...Charbal got it though. The pattern contains & and [**> <**} from time to time. I'll try the %*, 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