 |
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sat Mar 14, 2009 5:48 pm
[305B] #MXP behaves erratically. |
Some #MXP tags (the entire lines containing the tags, actually) are echoed to the main window as if they were the object of a #SEND command instead of being executed.
As an example, this code has been working since version 2.34:
Code: |
$line = "<color "0x00FF00">[Exits:"
$exits = %replace( %1, " ", "|")
;;
#MXP <expire exits>
;;
#FORALL $exits {#IF (!%ismember( %lower( %i), "other|none")) {$line = %concat( $line, " <Hex>", %i, "</Hex>")} {$line = %concat( $line, " ", %i)}}
;;
$line = %concat( $line, "]</color>")
;;
#SUB {$line}
|
The <HEX> tag is defined as follows:
Code: |
<!ELEMENT Hex '<send expire="exits">'>
|
Under this version, the #MXP <expire exits> command is not executed, instead it is sent to the main window with the color usually expected from a #SEND command.
Other scripts that use MXP suffer from similar problems. However, oddly enough, some scripts that exhibit this behavior when invoked from another script, will execute properly when invoked from the command line.
The problem with the above script is solid. |
|
_________________ Sic itur ad astra. |
|
|
 |
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sat Mar 14, 2009 6:46 pm |
I have this problem too using #PRINT with MXP color tags. It doesn't read the tags it just prints it all to the screen.
Code: |
#PRINT {<color red>Something</color>} |
prints
"<color red>Something</color>" instead of a red "Something" to the screen in the same color as normal print without color tags. |
|
|
 |
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Sat Mar 14, 2009 7:47 pm |
This may be related the the potential bug requiring the Force Remote MXP option to be selected?
|
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Mar 15, 2009 6:44 am |
I just tested oldguy2's example in a blank session and didn't have a problem. Go to MXP options and make sure the Enable Local MXP/HTML option is checked.
|
|
_________________ Asati di tempari! |
|
|
 |
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Sun Mar 15, 2009 12:33 pm |
ahh, yes. You are right tech. However, #SHOW doesn't .
|
|
|
 |
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sun Mar 15, 2009 6:37 pm |
If there are new things to check or un-check, shouldn't they be documented? If a new release comes out and the scripts stop working or behave in an odd fashion then it is either a bug or an undocumented change. Meaning that neither my settings nor my scripts have changed, so things should keep working as they have been unless one or both of those two scenarios are in effect.
|
|
_________________ Sic itur ad astra. |
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Mar 15, 2009 9:36 pm |
It was documented in the 3.04 change log
Quote: |
# MXP: Separated the MXP Telnet option (causing CMUD to respond to the telnet option), from the Enable MXP/HTML which enables MXP parsing locally for scripts
# MXP: Added new "Force remote MXP" option to determine if MXP is enabled for the remote server even if the remote server does not negotiate MXP. This option is now DISABLED by default to prevent CMUD from parsing MXP by mistake from MUDs without MXP support. To restore the previous operation of CMUD, turn this option on. Having this option disabled makes CMUD more compliant with other MXP clients |
However their is a quirk/bug here. It doesn't work with #SHOW initially because the force Remote MXP option was not checked by default. Arguably this could be considered expected behavior because according to the documentation
Quote: |
The difference between #SAY and #SHOW is that #SHOW processes the text just as if it was received from the MUD. |
We would still have a small issue because if that's the case then unchecking Force Remote MXP should stop #SHOW from processing again, and that's not the case. I'll leave it to Zugg to sort out that niggle. |
|
_________________ Asati di tempari! |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Mar 16, 2009 5:48 pm |
Hmm, the #MXP command shouldn't be having this problem. Tech is correct about the operation of #SHOW, and that won't change. But the #MXP command should be ignoring the new Force Remote MXP option since it only uses local MXP.
Technically, the syntax of the #MXP command is:
#MXP {text}
so try putting {} around your tag name. The #MXP command has an optional first argument that sets the MXP security mode, and without the {} maybe it's getting confused. Although this still shouldn't make the remote MXP option have any effect on it, so I'll take a look at this. |
|
|
 |
|
|