Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Wed Dec 06, 2006 6:44 pm   

[1.19] #CW Using the wrong colour
 
Originally reported in zMUD 7.21
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=21851

Now the same is happening with CMUD - using similar triggers but not from an imported .MUD file.

Basically I have triggers that colour people online in yellow
I have other triggers that colour industry types in green

Sometimes names come up green

The screenshot below shows it happening.
Notice the name 'Saddist' appears yellow through the page, then suddenly green. I made no changes to any triggers, aliases, variables etc during that session - I was idling for most of it.



The annoying thing is it's not possible to force a reproduction of this error - it happens seemingly randomly
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Dec 06, 2006 8:15 pm   
 
I usually see this when the mud misses color codes.

#DEBUG color1.txt color2.txt
get it to happen
#DEBUG

Checking the files will probably point a finger at the mud.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Wed Dec 06, 2006 8:38 pm   
 
I'm sure it's not colour codes, because when it happened in zMUD then I changed the industry highlighting to red instead of green and the names started going red sporadically instead
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Wed Dec 06, 2006 8:48 pm   
 
Could you be getting some sort of trigger clash with the trigger that colours the word "well" green?
_________________
Taz :)
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Dec 06, 2006 9:18 pm   
 
No its the word Saddist on a new line that got default ansi coloring.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Wed Dec 06, 2006 9:19 pm   
 
nah, wouldn't be.

The "well" comes from a variable called industries, which is just a string list
bakers|bank|brewery ... well|windmill|yeast tank
etc.

The only thing that uses the variable industries is a regex that matches
\b(?:@industries)\b

with action
#CW $008000

There is no other action on @industries at all


The name highlighting is a regex
\b(?:@wholist)\b

with action
#CW $C08040

There is nothing else that tries to colour the @whoList variable either


It's not the mud at fault, I can almost guarantee that. The default colouring set by zMUD is white. The mud doesn't colour names at all. It also doesn't happen if I disable the highlighting class
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Dec 06, 2006 9:28 pm   
 
Try to catch it in DEBUG then and see the raw codes.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Wed Dec 06, 2006 11:17 pm   
 
Didn't we already decide that you shouldn't use $RRGGBB colors in CMUD because of conflicts with the local variable syntax? I'd say that you should find another way to express your desired color and see if the problem goes away.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Wed Dec 06, 2006 11:36 pm   
 
Didn't know about any conflicts with local variables. It's exactly what happened in zMUD though, so I'd be surprised if it's local variables this time
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Dec 06, 2006 11:44 pm   
 
Saying that, why were you using %q to match any punctuation when it was blank space you were trying to match? It's %s you use for that. Or, saying that, just explicitly putting the space in the pattern.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Wed Dec 06, 2006 11:55 pm   
 
Because I want to match the start of a line too. %q is just %s but matches start/end of lines too
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Wed Dec 06, 2006 11:58 pm   
 
Trigger patterns of %q match punctuation, spaces, and end of line; making %q much more useful in general then %s. So that eliminates 1 problem.

Zugg already adjust #COLOR, #CW, and #PCOL to recognize the $RRGGBB syntax a while ago. The alternate syntax of #RRGGBB is also supported so that eliminates another issue.

I think it is pretty clear that there is a trigger problem, but I expect it is so obscure it may never be found.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Thu Dec 07, 2006 4:15 pm   
 
Just for giggles change the color of the @industries trigger from green to something else and see if Saddist appears incorrectly in that new colour rather than in green, if it does then there is some sort of odd bug going on with similar colouring triggers and we'll be getting closer to tracking it down, if not then I think it points more to a problem with the colouring system rather than triggers.
_________________
Taz :)
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Thu Dec 07, 2006 4:25 pm   
 
See my initial reply to TonDiening...
Quote:
I'm sure it's not colour codes, because when it happened in zMUD then I changed the industry highlighting to red instead of green and the names started going red sporadically instead
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Thu Dec 07, 2006 5:01 pm   
 
How many similar colouring triggers do you have? Only the two or more? If more and the industry one is turned off do you get the colour problem happening with a colour from one of the others?

I'm thinking some sort of internal lookup or pointer is going wrong and picking out the wrong trigger and executing it's body, but the only person who could confirm if such a thing is possible would be Zugg.
_________________
Taz :)
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Thu Dec 07, 2006 5:08 pm   
 
have a few more, but only two colour in green
\b(?:@industries)\b
\b(?:@randomInfo)\b

The randomInfo variable doesn't exist yet though, so should never fire (was just put in in anticipation of stuff I never did in the end)

I've deleted randomInfo variable now too
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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