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
krohnu
Beginner


Joined: 09 Mar 2003
Posts: 28

PostPosted: Mon Jul 21, 2003 8:49 pm   

Time Stamp bug...
 
I seem to be having trouble with my time stamp trigger i have set up in my comm window.

here is the trouble i have, it repeets any communication captured that has a special char in it 3 times.
example:
12:24:58 pm i129 2634H 4856M 568E 52944G {S: 91 %}{E: 57 %}> You csay, '(tanis) heh'12:24:58 pm i129 2634H 4856M 568E 52944G {S: 91 %}{E: 57 %}> You csay, '(tanis) heh'%}{E: 57 %}> You csay, '(tanis) heh'

that one just happend to be sent at the same instant that the battle status displayed.

here is the itmes i have set up:
alias: attconnect(#WIN comm
:comm:#TR {*} {#SUB {%time("h:nn:ss am/pm") %trigger}})

and a normal trigger that sends all tells/csay and whatever else to the comm window.

Thanks ahead of time!
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Jul 22, 2003 3:00 am   
 
This happens because #SUB is one of the trigger-types which is allowed to match more than once per line. When you have those special characters in the middle of the line, the * matches once on the part before a special character and once on the part following it. The more special characters embedded in the line, the more times * will match.

One solution is to anchor your pattern to the beginning of the line. Of course, you may miss a few lines which begin with a special character, but it should stop the multiple entries.

Another solution is to do away with the trigger and send the timestamp from the main window along with the tells/csay/whatever else, using #SAYP or similar.
Reply with quote
krohnu
Beginner


Joined: 09 Mar 2003
Posts: 28

PostPosted: Tue Jul 22, 2003 4:02 pm   
 
Well almost LightBulb,

I tried your first suggestion, but it still has the same trouble if i, or the person i am talking to sends a special char as well. I was speaking with a friend who is trying to do the same thing with an older version of zmud 5.55 and if a special char is sent then it crashes the entire app.

If i set my trigger that does the capturing to also attempt to do the timestamp i seem to loose the captured text and only get the time stamp. Here is my syntax:

#Trigger {{shout|csay|ooc,|oocs|gossip}{#cap comm;#sayp %time("h:nn:ss am/pm)"#gag;#beep}

So I still continue, but thanks the the suggestions.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Jul 22, 2003 8:03 pm   
 
If anchoring doesn't work, then you'll have to either give up on using #SUB this way or accept the multiple entries on lines containing special characters.

That leaves the other option. It works fine when it's scripted correctly, but your trigger is full of errors.
1. You have two braces at the beginning of the Pattern, but only one at the end
2. You didn't leave a space between the end of the Pattern and the beginning of the Value
3. You have the closing parenthesis of the %time function inside double-quotes
4. You don't send the #SAYP command to the comm window

It's not surprising it doesn't work. Here's one that does.
#TR {{shout|csay|ooc,|oocs|gossip}} {:comm:#SAYP %time(h:nn:ss am/pm)" ";#CAP comm;#GAG;#BEEP}
Reply with quote
krohnu
Beginner


Joined: 09 Mar 2003
Posts: 28

PostPosted: Tue Jul 22, 2003 8:10 pm   
 
That did it LightBulb!

Thanks! oh, and my triggers are not as full of errors, I just am not use to the commandline form and did a poor job converting it.

The part i did not do was, as you said, not sending the #sayp to the com window!
Thanks for your help!
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