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
Radamanthas
Newbie


Joined: 22 Nov 2004
Posts: 9

PostPosted: Sat Mar 15, 2008 4:07 am   

Expanding a variable in #prompt
 
I know I have done it before a long time ago, but for the life of me, I cannot remember how...

Using zMud 7.21, I want to expand a variable in the #prompt command...something like this:

#var area_name {The Haunted Woods}
#prompt exit_dir "In which direction lies the way out of <@area_name>?"

In the dialog box that the #prompt pops up, I want the text to read: "In which direction lies the way out of The Haunted Woods?"


Any ideas?

TIA
Reply with quote
Zugg
MASTER


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

PostPosted: Sat Mar 15, 2008 4:17 am   
 
Variables are never expanded within " quotes. You need to use {} instead, like this:

#prompt exit_dir {In which direction lies the way out of @area_name?}

Or, form the string using the %concat function:

#prompt exit_dir %concat("In which direction lies the way out of ",@area_name,"?")
Reply with quote
Radamanthas
Newbie


Joined: 22 Nov 2004
Posts: 9

PostPosted: Sat Mar 15, 2008 4:26 am   
 
Thanks!
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