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
Zhiroc
Adept


Joined: 04 Feb 2005
Posts: 246

PostPosted: Sat Oct 07, 2006 9:51 pm   

Reparse trigger not firing depending on line length
 
Take this trigger:
Code:
#REGEX "ChatTrig" {^(?=You paged)} {#SUB {[%time( hh:nn)]~ };#COLOR white,hi} "" {case}
#COND {\] (You) paged (.*?) with ('.*)} {#PCOL purple,hi %x1;#PCOL green,hi %x2;#PCOL cyan %x3} {reparse|regex}

Do
Code:
#sh You paged xxx with 'dfkljklas lkjdfk lkjsdf k dlkfj lkjdsf k sdlkfj k daflkj kljkjkljdsk kl'
and the coloring of the 2nd state happens as expected. Add one character to the line:
Code:
#sh You paged xxx with 'dfkljklas lkjdfk lkjsdf k dlkfj lkjdsf k sdlkfj k daflkj kljkjkljdsk klx'
and now it doesn't. In fact, if you add another #sh to that state, it is clear it doesn't fire at all.

Take out the "] " from that regex, and now it does fire, but the coloring is all wrong. It seems like it hasn't reread the line to know that it has changed.
Reply with quote
Zhiroc
Adept


Joined: 04 Feb 2005
Posts: 246

PostPosted: Mon Oct 09, 2006 7:10 pm   
 
I've found that this is somewhat related to line wrap. I have the problem for any line that starts to wrap, as long as it is not "too long." For example, if the first line wraps by 1 to 15 characters, the trigger doesn't fire, but after that, it does.

Remember, it's not just a coloring artifact. The script does not execute, which is proven by the fact that if you place a #show in the state, it doesn't appear.
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