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: Sat Mar 21, 2009 9:51 pm   

(Fixed) [3.05] MXP only working in an alias that is not called through a trigger
 
This is so odd that I'm almost positive I'm at fault somehow, yet I can't figure it out.

Why does the MXP coloring work in the alias when the alias is called through another alias, but not when it is called through a trigger?

Steps:
Code:
1) Open Cmud, press escape to get to a blank session.
2) Fix the xml code as follows (or copy out the code in editor mode - so that it's not interpreted).  The web site is interpreting the MXP codes.  Remove the () from around the & below and use this line for the print in the alias.
'#print (&)lt;color blue(&)gt;$player(&)lt;/color(&)gt;'
3) Paste in the fixed xml code
4) Type 'runme'

The same alias is being run twice, once via a call from an alias and once via a trigger.  In one case it works, in the other it doesn't.  I can't explain the difference.


XML Code:
Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <class name="test5" copy="yes">
    <alias name="players_alert" autoappend="true" copy="yes">
      <value>#print $player</value>
      <arglist>$action, $player, $dir, $extra</arglist>
    </alias>
    <trigger priority="37560" case="true" stop="true" regex="true" copy="yes">
      <pattern>test</pattern>
      <value>players_alert "Arrives" "Player" "w"</value>
    </trigger>
    <alias name="runme" copy="yes">
      <value>#show Trigger
#show test
#show Alias
players_alert "Arrives" "Player" "w"</value>
    </alias>
  </class>
</cmud>


Last edited by ReedN on Sat Apr 18, 2009 7:14 pm; edited 1 time in total
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Sun Mar 22, 2009 6:04 am   
 
Not sure if the blank session is an issue, but this appears to once again be an issue with Force Remote MXP option being disabled?
Reply with quote
ReedN
Wizard


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

PostPosted: Sun Mar 22, 2009 3:01 pm   
 
It appears so. I enabled the 'Force Remote MXP' option and it started working as expected.

I had actually looked through all the MXP options when trying to debug this and it still hadn't dawned on me that this option might have been involved. In my mind this option sounded like it was somehow going to force Cmud to assume the MUD I was playing on was MXP, which it isn't, and thus I kept it off. I had no idea it would affect whether an alias would run properly from a trigger or not.
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Sun Mar 22, 2009 3:11 pm   
 
We discussed it briefly in http://forums.zuggsoft.com/forums/viewtopic.php?p=145536 and Zugg in another topic on it wrote.

Quote:
I'll add that to the bug list. The #PRINT command is using the same low-level code as the #SHOW command, which causes CMUD to think the text is received from the MUD, and thus applies the remote MXP option to restrict MXP. Using the #MXP, #SAY, #ECHO, etc commands work fine. I'll fix the #PRINT command to also work in the next version. But this issue will always continue to happen if using the #SHOW command, since #SHOW is intended to mimic text received from the MUD.


So, no matter what, if the option in disabled, #SHOW will always return what you got. The intent of the option was so that when a non-MXP mud sent some text that had the same format as an MXP command, that CMUD wouldn't parse it as such (if the Forcing was disabled that is).
Reply with quote
ReedN
Wizard


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

PostPosted: Sat Apr 18, 2009 4:27 pm   
 
Confirmed fixed in 3.06 (#print and #mxp should now be properly ignoring the Remote MXP option).
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