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
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Fri Nov 19, 2010 6:07 am   

3.32 #Prompt in MXP links bug
 
1. Create a new class folder in the untitled session.
2. Copy and paste the XML below into the new class, replacing any information that was previously there.
3. Save and exit the package editor. (You can check the value of @testvar before closing if you want it's set to 4.)
4. Type prompt on the command line. (The box will pop up with the current testvar value of 4 showing in the input field, all good so far.)
5. Close the box and type MXP on the command line now.
6. Click the link and look at what is displayed in the input field of the box. (I see a lowercase t every time.)

Seems like using #prompt in the mxp link is screwing up the displayed value of @testvar somehow.

Code:
<class name="#prompt_test" id="3">
  <var name="testvar" id="1">4</var>
  <alias name="MXP" id="2">
    <value><![CDATA[#mxp <c lime><send '#prompt testvar "Enter the value for the testvar variable."'>Testvar value</send></c>]]></value>
  </alias>
  <alias name="prompt" id="4">
    <value>#prompt testvar "Enter the value for the testvar variable."</value>
  </alias>
</class>
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Nov 19, 2010 5:33 pm   
 
When you have a complex command like that which includes " quotes, you need to put it into an alias rather than hardcoding it into the MXP command itself. For example, changing your MXP command to this worked just fine:
Code:
#mxp <c lime><send '#EXEC prompt'>Testvar value</send></c>

In general, the MXP parser doesn't know how to fully parse zScript commands and functions. So it can get easily confused.
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Sat Nov 20, 2010 9:43 pm   
 
I went with an alias in place of the quoted command after making the post, but wasn't sure if it was a bug or not. Thanks for the response.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
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