 |
mswood Newbie
Joined: 08 Aug 2002 Posts: 2 Location: USA
|
Posted: 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 |
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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 |
|
|
 |
mswood Newbie
Joined: 08 Aug 2002 Posts: 2 Location: USA
|
Posted: 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 |
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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 |
|
|
 |
|
|