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


Joined: 03 Dec 2004
Posts: 4

PostPosted: Fri Dec 03, 2004 1:18 am   

Strange issue with #SUB
 
Im having a very strange issue using the #sub command.

Im using a trigger to remove and replace colors for public lines on a mud I play on.

This is the trigger as it stands currently

[i]#TRIGGER {^(%w) ~<auction~> (*)%cr} {#SUB {%ansi(gray)%1 <C violet>~(auction~)</C>%ansi(gray) %2}}[/i]

Now this seems to work fine for one line, but then fails on the next (stripping the <auction> part of the line in the process) so it ends up looking something like this...

Jacob (auction) Anyone want to buy a ring of forgetfullness??
Janet How much
Lazurius (auction) me, me, me
Jacob make an offer Janet
Janet (auction) 20k

All of this was on the auction line, however if i were to press enter after a working line, the trigger would continue to work on the next line.

Does anyone have any ideas how to solve this. Im Using verion 7.05 btw
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Fri Dec 03, 2004 11:52 am   
 
I think it is because you have the %cr in your trigger line. Remove it and try it.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
daala
Newbie


Joined: 03 Dec 2004
Posts: 4

PostPosted: Fri Dec 03, 2004 3:55 pm   
 
Nope, it still dosent seem to work correctly when removing the %cr

I think it was actually added while trying to debug it

(btw adding a %cr to the end of the #SUB part of the trigger actually makes it work, but generates and extra blank line between the lines)
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Dec 03, 2004 5:09 pm   
 
Try quoting the mxp refrences *untested*

#SUB {%ansi(gray)%1 ~<C violet~>~(auction~)~</C~>%ansi(gray) %2}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
daala
Newbie


Joined: 03 Dec 2004
Posts: 4

PostPosted: Fri Dec 03, 2004 10:49 pm   
 
Unforutnatly that hasnt worked either, it gives exactly the same result :(
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Sat Dec 04, 2004 4:51 am   
 
daala,
I have tested your above trigger and I am not getting the same results you are. I would suggest you turn off all other triggers you have and see if you get the same results. If it suddenly starts working correctly then you have another trigger that is messing up the output.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

PostPosted: Sat Dec 04, 2004 8:02 am   
 
I noticed this using the mxp tags on a substitute I wrote a while back, wasn't that big of deal I just switched to using %ansi so I really didn't look into but I did notice it will work the way you want if you disable mxp/html under telnet options.
_________________
I love deadlines. I like the whooshing sound they make as they fly by.
Reply with quote
daala
Newbie


Joined: 03 Dec 2004
Posts: 4

PostPosted: Sat Dec 04, 2004 8:12 am   
 
Thanks Jessew

As soon as i disabled the MXP option the trigger works exactly as expected.

Thanks for all you help everyone :)
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