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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
cypren
Wanderer


Joined: 03 Nov 2000
Posts: 59

PostPosted: Tue Feb 06, 2007 3:24 am   

%mxp.<attribute> in MXP triggers
 
So I have an MXP tag defined as:
Code:
<!ELEMENT clearStream EMPTY>
<!ATTLIST clearStream id>

I'm receiving a tag in the form of:
Code:
<clearStream id="inv">

from the MUD and I have an MXP trigger set up for the "clearStream" MXP tag.

To the best of my understanding, I should be able to reference the variable %mxp.id inside this trigger to get the "inv" passed from the tag, but it doesn't seem to be working. I've changed the name of the parameter (just in case "id" is a reserved keyword), tried sending the tag with or without the parameter qualifier (i.e. "<clearStream inv>"), with and without quotes, etc, and nothing is working. The only way I can actually get the data from the tag is to use the %0 special variable that gives me the entire contents between the <>. I've finally resorted to doing
Code:
#TRIGGER {clearStream} {streamToClear = %remove( "clearStream id=", %0);:@streamToClear:#CLR} "Streams" {mxp|nocr}

and while this works just fine, it's crude and inelegant.

What is it I'm not understanding about the way the %mxp variable works?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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