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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Fri Jun 06, 2008 12:32 am   

CMUD 226 - Apparent #MXP problem
 
Prompted by an anomaly in some #MXP output, I ran the following test:
Code:

#MXP <color yellow>test 1</color>
;;
$color = "yellow"
;;
#MXP <color $color>test 2</color>
;;
$line = %concat("<send><color yellow>test 3</color></send>")
;;
#MXP $line
;;
$line = %concat("<color yellow><send>test 4</send></color>")
;;
#MXP $line

The result was that the first two outputed lines were colored yellow as expected, but the third was outputed white, then the fourth line was yellow. This is consistent. It seems that if <color xxxx> is not the outer tag, then the item will not be colored. I used concatenation in the test because in the live script the #MXP output is generated.
Now, I can live with this, but I have it coded the other way everywhere and it worked before. So I am wondering if this is a bug or a design decision.

EDIT: When the raw output is sent to the window without the #MXP command, the color comes out correctly.
_________________
Sic itur ad astra.
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Jun 06, 2008 1:08 am   
 
Quote:
When the raw output is sent to the window without the #MXP command, the color comes out correctly.

OK, that's really weird since the #MXP command is like the #SHOW command and stuffs the text directly into the CMUD network buffer. So are you sure it works normally?

I can see where the new URL Style might interfere with the color and cause this kind of problem. It's the kind of problem I was pulling my hair out trying to fix yesterday (your 4th case wasn't working at all yesterday and I was initially worried about your post thinking that is what you were going to say).

Anyway, post as much other info about this as you can since I'm still a bit confused as to what works and how it would be different than the example you gave that doesn't work.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Jun 06, 2008 1:13 am   
 
Well, I'm experiencing the same problem with color output being different, only in a different way. This is the code I use:
Code:
#mxp 1 {%ansi(15)@padLeft(%i, 2, " ")" "%ansi(12)~<send %char(34)rrun %item(@RoomwalkData.RoomList,%i + @RoomwalkData.LoopOffset)%char(34)~>%roomname( %item( @RoomwalkData.RoomList, %i + @RoomwalkData.LoopOffset)) :- %ansi(15)%zonename( %roomzone( %item( @RoomwalkData.RoomList, %i + @RoomwalkData.LoopOffset)))~</send~>%ansi(8)}

Normally, that should show everything in red output. Instead, it shows it all as gray. The %ansi(12) is what should make it red.

Charneus
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Fri Jun 06, 2008 1:18 am   
 
Well, it seems that if you wrap the send tag within the color tag everything works fine. When the send tag is the wrapper, then the color tag is not applied. I wrote some of the scripts way back in 1.34 and the others in 2.25 and always used the <send xxxx><color xxx>xxxx</color></send> scheme. Now, to make it work I have to reverse the tags.

EDIT: Checked the URL style. It's set to NONE.
_________________
Sic itur ad astra.

Last edited by Anaristos on Fri Jun 06, 2008 1:20 am; edited 1 time in total
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Jun 06, 2008 1:18 am   
 
Charneus: Post some of the values of your variables so that the rest of us can test it. I pasted your command into CMUD and it displayed " :- " all in red here. And in the package that you sent me to test the mouse problem with MXP links (using your lr alias), it also worked fine and displayed red.

You might want to check your URL Style and make sure the foreground and background colors are set to "None", otherwise they will override the current text color within any link.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Jun 06, 2008 1:31 am   
 
I'll post the values of the variables in a bit... gotta hunt them down in my packages. What's weird is that it doesn't do that in a blank session, so I'm going to have to assume it's something with the session I have now, although it never was a problem before now. And I'm still having trouble with that mouse problem, by the way.

Interesting enough, even shortening the script to:

#mxp 1 {%ansi(15)" "%ansi(12)~<send %char(34)rrun 31404%char(34)~>:-~</send~>%ansi(8)}

It still displayed in gray, not red... I did check the URL Style, and both are set with "None."

Charneus
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Jun 06, 2008 1:42 am   
 
Hmmm... I found the problem, I believe (at least with my script).

The %ansi(8) is the ansi code for gray. For some reason, it's outputting it in that color instead of red on my machine. If I take off the %ansi(8), then it works without flaw... *sigh*

Charneus
Reply with quote
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: Fri Jun 06, 2008 1:43 am   
 
I have a similar problem, with mxp settings in my status window

http://www.hotlinkfiles.com/view/full/1423526_vuss1

Code:
<stat name="XPbar" showinbar="false" showinwindow="true" priority="521" id="113">
  <value><![CDATA[XP Trackers: <send 'settingtoggle stw_mark'>Mark</send> <send 'settingtoggle stw_run'>Run</send> <send 'settingtoggle stw_login'>Login</send> <send 'settingtoggle stw_today'>Today</send>]]></value>
</stat>


Is the code i'm using, also have it in a few other locations as shown in the screenshot. url styles are set to none, changing to several colors didn't seem to fix the problem either.
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Jun 06, 2008 2:25 am   
 
Charneus: As I said, go into your Styles and look at the new URL Style and let me know what it is set too. I need to figure out what setting is different between your session and a blank session to see what might be causing this. It's going to be a tough bug to track down if it only happens in your session and not in a blank session.

wrym: the problem with the Status Window is actually something different. Turns out that the status window doesn't get a proper URL style. The URL style in your preferences is for the main MUD window and not the status window. I'll add that to the bug list.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Jun 06, 2008 3:01 am   
 
charneus wrote:
It still displayed in gray, not red... I did check the URL Style, and both are set with "None."


I did. And like I said, removing the %ansi(8) at the end seemed to have fixed it. :\ Don't know why that was happening.

Charneus
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Jun 06, 2008 4:19 am   
 
Yeah, but having the %ansi(8) at the end shouldn't have done that, so it's still a bug and I'm trying to track it down. If you can figure out anything else different between your session and a blank session that causes this, let me know.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Fri Jun 06, 2008 4:50 am   
 
As for my problem, the solution for the time being is to wrap the <send> tags within the <color> tags. Doing it the other way around won't display the color correctly.
_________________
Sic itur ad astra.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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