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
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Thu Jan 28, 2010 6:55 am   

[3.12] MXP with Prompt question
 
I have an MXP trigger that fires when it sees the 'Prompt' MXP tag. That seems to be working fine.

What I would really like to be able to use is the text inside the prompt tag. It isn't passing properly into the MXP trigger with %0.

I receive this from Achaea:
Code:
<PROMPT><ESC>[32m8943h, <ESC>[37m<ESC>[32m8639m, <ESC>[37m<ESC>[32m40550e, <ESC>[37m<ESC>[32m35600w <ESC>[37mcexdb-<ESC>[4z</PROMPT>


But %0 only contains:
Code:
8943h,


Where's the rest of the prompt text?

And does anyone know how to get the %mxp variable to work in this case?
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Thu Jan 28, 2010 7:17 pm   
 
I'm thinking it could be one of two possible things causing this. Perhaps the escape codes for its color is causing it, or perhaps the space in the prompt causes it.

Also confusing to me is that the help file says you can use %mxp as well as %0, but I can't figure out how to get that to work. The %mxp.data didn't display anything.
Reply with quote
Zugg
MASTER


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

PostPosted: Thu Jan 28, 2010 8:24 pm   
 
Yep, this was a bug in %mxp.data. The %0 was correct because the ansi color codes were being converted to nested COLOR tags. I've got %mxp.data fixed for the next beta.

But always remember that %0 won't contain any nested tags, whereas %mxp.data returns all of the data between the start and end tags. When using ANSI color codes within MXP tags, the ANSI codes are always stripped though, so there is no way to access the "raw" data within the tag.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Fri Jan 29, 2010 12:37 am   
 
So if I try to summarize just to make sure I understand:

- %0 works fine but isn't going to give me the whole prompt because of the color codes.
- %mxp.data had a bug, but once fixed it will give me the whole prompt with the color codes stripped out.
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Jan 29, 2010 5:38 am   
 
Correct.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sat Jan 30, 2010 7:58 am   
 
Confirmed fixed in 3.13. Thanks!
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