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: Tue Dec 04, 2007 10:26 pm   

[2.14] Funny local variable bugs
 
Enter at the command line
Code:
$var="abc"
It gets sent to the mud.
Enter at the command line
Code:
#EXEC {$var="abc"}
Pops up a parsing error of invalid local variable.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Dec 04, 2007 10:41 pm   
 
This is because the command line is trying to parse your string argument to #EXEC, which is asking to evaluate $var, which doesn't exist. If you want #EXEC itself to handle the $var, then you need to put it into quotes:

#EXEC "$var=""abc"""

So this is working correctly.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Dec 04, 2007 11:06 pm   
 
I guess I should be drinking more coffee and less beer. Embarassed
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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