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
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Sun Aug 26, 2007 5:24 am   

[2.01] #ECHO %ansi
 
Sometime after echoing something in ansi color, the mud output from your next command gets colored black.

I cant get it to happen every time, but it does happen a lot.
_________________
Discord: Shalimarwildcat
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sun Aug 26, 2007 6:05 am   
 
I would need to see the exact %ansi command that you are echoing. I cannot reproduce this.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Sun Aug 26, 2007 6:14 am   
 
I have a push button that executes the following code.

#IF (@autojump=0) {
autojump = 1
#EC %ansi( red)Autojumping On
} {
autojump = 0
#EC %ansi( high, blue)Autojumping Off
}

This only affects the mud output, I can see the command echo just fine.
_________________
Discord: Shalimarwildcat
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sun Aug 26, 2007 3:27 pm   
 
I'll confirm this. I had some things in my Prompt trigger to #Sayp whatever colored red and as stated in the other thread they just cause an infinite loop, which really irritates me because I use them to notify me of certain issues like when I am webbed so I don't try and do something. Anyway, I changed them to #echo and now they color whatever line comes next red too.


Example:

1234h, 1234m exdb- **WEBBED**
writhe

You begin to writhe throwing your body off balance. <---is red now too
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Aug 27, 2007 6:06 pm   
 
I haven't been able to reproduce this using #SHOW to simulate output from the MUD, but I'll try it on a live MUD to see if I can figure out what is happening.
Reply with quote
sabman
Novice


Joined: 17 Aug 2007
Posts: 34

PostPosted: Mon Aug 27, 2007 6:08 pm   
 
Just tried it in my MUD. Held down the return button to see if any problems arose. Didn't find any.

It might be, though, that your if statement has an assignment operator.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Tue Aug 28, 2007 9:05 am   
 
I would like to add that if you use blink it will cause the next dozen lines to blink, which is really bad if you happen to look at the same time and it's a room description the whole screen starts blinking.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Tue Aug 28, 2007 9:23 am   
 
Sorry want to add more to this.

Lets say when I get a message from the mud about someone trying to control me I want that to be yellow and blinking to warn me.

So I do the following:

#say %ansi(yellow,blink) **WARNING** Person is trying to control you!!

That will cause the next couple lines to blink and not just what I placed within the #say command.

Now I also tried this:

#say %ansi(blink,yellow) **WARNING** Person is trying to control you!!

Placing blink first caused every line received after that to blink no matter what. I had to log out because it wouldn't stop.


Oh and if I #echo something on my prompt trigger it does indeed cause a blank line after it every single time. It doesn't matter if you use #say or #echo they both do this behavior.

Normally it would be like this...

1234h, 1234m excdb- **WEBBED**
You take a drink from a vial.
1234h, 1234m excdb- **WEBBED**

But now it's like this...

1234h, 1234m excdb- **WEBBED**

You take a drink from a vial.
1234h, 1234m excdb- **WEBBED**

The sun is setting.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue Aug 28, 2007 1:32 pm   
 
It is good practice to close ansi tags. What do I mean by that?

If the text color of your mud is usually green then you would do something like this if you wanted to echo a red line.

#echo %ansi(red)This line of text is red.%ansi(green)

Muds that use ansi usually do this only they tend to close tags with %ansi(0)... I don't suggest you use %ansi(0)

I know that in recent versions of cMud and I'm pretty sure in the last several zMud ones as well that they would USUALLY close ansi tags for you so you would not have these issues.

About 4 or 5 years ago I learned that if I sent text to a mud that did NOT have a close on it the very effects you are speaking of would occur.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue Aug 28, 2007 1:37 pm   
 
On the subject of the extra newline...

Would you show the trigger line and script for the **WEBBED** output you are getting?

It looks like you are using some variation of showp echop or sayp. Or even a psub with %cr %lf or %crlf in it. Again I think Zugg made some changes in the prompt detection and these changes could have effected this.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Tue Aug 28, 2007 2:36 pm   
 
Arminas,

No I am not using #sayp or #echop because both cause infinite loops. I also am not using psub or any %cr.


This is all it is or was until I deleted everything that echoed off the prompt.

The prompt trigger is regex and the following:

^(\d+)h\, (\d+)m\, (\d+)e\, (\d+)w ([cexkdb@]*)\-

When I wanted to echo something I just added it like the following:

#if (%db(@afflictions,webbed)) {#echo %ansi(red)**WEBBED**}

I will try to add another %ansi(grey) to the end of every single one to see if that works, although if that is the case then the help file ought to be updated. The example there doesn't show anything different...#SHOW %ansi(high,red)Hello%ansi(blink,blue,white)World<--no closing
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