|
SpiritWolf Wanderer
Joined: 02 Jul 2002 Posts: 74 Location: USA
|
Posted: Tue Mar 16, 2004 9:13 pm
Expanding a variable containing a command |
I seem to be having a problem with putting a command in a variable and getting it to work at the start of a line.
Using the following alias you can see what I mean.
#ALIAS test {#var test1 1234567890;#alias testing1 {#var cmd ~#say;@cmd @test1};testing1}
When run, it should use #say and display 1234567890 to the screen, but it instead tries to send #say 1234567890 to the mud.
Am I doing something wrong here, or is this a bug? |
|
|
|
Pega Magician
Joined: 08 Jan 2001 Posts: 341 Location: Singapore
|
Posted: Tue Mar 16, 2004 9:44 pm |
Try running it on your command-line.
'@cmd @test1' would send its contents to the mud.
' #say @test1' won't parse the say command either, because there is a space in front of it,
likewise with '~#say @test1',
and ' test' will send 'test' to the mud instead of parsing the alias.
Instead, do this:
Code: |
#ALIAS test {#var test1 1234567890;#alias testing1 {#var cmd ~#say;#exec {@cmd @test1}};testing1} |
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Mar 16, 2004 9:45 pm |
Chnage the alias like this:
#ALIAS test {#VAR test1 1234567890;#ALIAS testing1 {#VAR cmd ~#say;#EXEC {@cmd @test1}};testing1} |
|
|
|
|
|