|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Oct 27, 2007 2:33 pm
[2.09] CL Parser doesn't know about new alias |
When a new alias is created and immediately used in the same command line entry the parser sends the alias along as though the alias didn't exist.
1. Launch CMud
2. Close Sessions Window (ESC)
3. Enter at the command line
Code: |
#ALIAS abc {#SAY yes}
abc |
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Oct 27, 2007 3:05 pm |
I've seen this as well - I wondered if it was a threading problem, the alias being called before the database has been updated, but
#alias abc {#say yes}
#wait 5000
abc
fails as well. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sat Oct 27, 2007 3:11 pm |
Confirmed. I even this to see if it made a difference, but it did not.
Code: |
#ALIAS abc {#SAY yes}
abc
#echo john
abc |
[edit] Fang beat me to it. |
|
_________________ Asati di tempari! |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Sun Oct 28, 2007 6:51 am |
I think it's because the whole command line is compiled in one batch, and so the alias doesn't really exist when it is being called. Zugg will confirm though.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Oct 29, 2007 10:07 pm |
Yes, Seb is correct. The entire command line is compiled at once, and at compile time the alias doesn't exist yet.
This is really a side-effect of the "smart" command line. When CMUD is compiling the command line, if it sees something that isn't an alias, it assumes that this is something you want to send to the MUD. In normal script execution, CMUD still treats the unknown string as a possible alias reference until run-time. But on the command line, any unknown string is sent to the MUD. |
|
|
|
|
|