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


Joined: 08 Aug 2002
Posts: 2
Location: USA

PostPosted: Mon Aug 12, 2002 8:25 am   

Calling an Alias from an Alias
 
I've tried everything to have one alias call another alias, but it (Zmud 6.16) keeps sending the name of the alias to the mud rather than expanding it. I didn't see anything with a quick search on this board, so hopefully someone can answer my question.

Not even %alias(aliasname) worked, even though it did work in my triggers.

-G&G
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Aug 12, 2002 12:13 pm   
 
This is really weird. I have no problems having an alias call another. If you enter this into the command line, does it work?:
#ALIAS test1 {#SAY hello}
#ALIAS test2 {test1}
test2

Kjata
Reply with quote
mswood
Newbie


Joined: 08 Aug 2002
Posts: 2
Location: USA

PostPosted: Mon Aug 12, 2002 1:25 pm   
 
Typing all of that from the command line worked, Kjata. So, what I did was try calling test1 from my other alias, and it still failed.

What I have is a trigger that calls an alias with %alias(aliasname) from within an %if statement. That alias then calls another alias. For some reason, the second alias does not get expanded.

Maybe that makes a difference?

G&G
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Aug 12, 2002 1:42 pm   
 
%alias does not call an alias, it returns the commands that the alias is supposed to execute, and %if does not execute commands, it returns either the second argument or the third argument based an whether the condition is true or not. If you need to execute commands based on a condition, then you need to use #IF.

Kjata
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