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
Eowyn
Apprentice


Joined: 19 Jan 2001
Posts: 117
Location: Norway

PostPosted: Sat Nov 29, 2003 11:57 am   

Getting the value of a variable into an alias?
 
I have a variable called p1, which captures a string by triggers.

I also have this alias:
#alias makep1 {#alias %1 {embrace;channel 'travel' %expand( @p1)}

...which doesn't work. I get %expand( @p1) in the newly made alias - not the value of p1.

How can I fix this?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Nov 29, 2003 3:42 pm   
 
#AL makep1 {#EXEC %expand( #AL %1 {embrace;channel 'travel' @p1})}
Reply with quote
Eowyn
Apprentice


Joined: 19 Jan 2001
Posts: 117
Location: Norway

PostPosted: Sun Nov 30, 2003 12:27 am   
 
When I enter that command, zmud tells me there is a syntax error, but I can't seem to find out why it refuses to accept it. Any ideas?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Nov 30, 2003 5:21 am   
 
zMUD isn't as smart as me. Just ignore it and use the command anyway. [}:)]

zMUD thinks there's an error because normally a command isn't allowed inside a function. However, the command works. I tested it several times. Did you try it even once?
Reply with quote
Toetag
Magician


Joined: 10 Oct 2000
Posts: 356
Location: USA

PostPosted: Sun Nov 30, 2003 5:42 am   
 
that was too funny lightbulb.

If it was anyone else but you, i'd not believe it :)
Reply with quote
Eowyn
Apprentice


Joined: 19 Jan 2001
Posts: 117
Location: Norway

PostPosted: Sun Nov 30, 2003 12:44 pm   
 
*Cough* Next time I'll just ignore Zmud. Nope - didn't test it until now - works like a charm. Thanx a bunch. :)
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