|
Radamanthas Newbie
Joined: 22 Nov 2004 Posts: 9
|
Posted: 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 |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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,"?") |
|
|
|
Radamanthas Newbie
Joined: 22 Nov 2004 Posts: 9
|
Posted: Sat Mar 15, 2008 4:26 am |
Thanks!
|
|
|
|
|
|
|
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
|
|