Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: 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!
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: 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.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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