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
Mozzie
Beginner


Joined: 24 Nov 2006
Posts: 17

PostPosted: Mon Jan 22, 2007 1:50 pm   

Send MXP and %1
 
I have been wrestling with transferring my zmud scripts into cmud and I am just about ready to give up.

My current frustration is trying to convert

#SUBSTITUTE {~<send "wp %1|p %1|wear %1|get %1|buy %1" "weaponprobe|probe|wear|get|buy"~>robe%1~</send~>}

into something cmud will accept. The problem is the %1 variable being within quotation marks. According to my compatabilty report virtually all my problems are a variation of this.

Thanking you in advance for your help.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Jan 22, 2007 2:15 pm   
 
<> aren't special characters now, don't need to quote them. "" are special characters (they cause CMUD to interpret whatever is in them as a literal string) so you need to quote them.

#SUBSTITUTE {<send ~"wp %1|p %1|wear %1|get %1|buy %1~" ~"weaponprobe|probe|wear|get|buy~">robe%1</send>}

You could also just change them for single quotes.

#SUBSTITUTE {<send 'wp %1|p %1|wear %1|get %1|buy %1' 'weaponprobe|probe|wear|get|buy'>robe%1</send>}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Mozzie
Beginner


Joined: 24 Nov 2006
Posts: 17

PostPosted: Mon Jan 22, 2007 2:57 pm   
 
Thanks, the second one worked for me.
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