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
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Oct 02, 2006 12:33 pm   

[1.08] Multiple commands in command input
 
#unvar test
test.a="a"
#say @test.a
test.b="b"
#say @test.b

First, try inputting the above one line at a time
It works as expected, i.e. shows
Code:
a
b


Then, try pasting it all into the command line at once, or on one line using ; to separate.
#unvar test;test.a="a";#say @test.a;test.b="b";#say @test.b

It seems to not execute certain bits after the first line

Code:
Variable test removed.
#say
#say
test.b="b"
test.a="a"


It's rearranging the order of the #say and variable assignment as well as not working though, so makes me think the parser is grabbing everything and then executing it in the wrong order?
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Oct 02, 2006 12:56 pm   
 
Just as an addition

It seems it's the key/value variables that it's broken with

test1=1;test2=2;#say @test1;#say @test2
is fine

test.1=1;test.2=2;#say @test.1;#say @test.2
is weird
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Oct 02, 2006 7:17 pm   
 
Yes, this is related to a bug Rorso reported. The var.prop=value syntax wasn't working unless it was the first statement in a script. So doing the script line by line would work (the var.prop=value was the only thing in the command line), but the multi-line command wasn't working. This is fixed in v1.09.

It's good to remember that CMUD and zMUD handle the command line processing completely different. In zMUD, *everything* is handled on a line by line basis. This is why zMUD has some trouble with multi-line scripts. In CMUD, the entire contents of the command line are compiled and executed. This makes multi-line scripts easier to handle, but can make it behave differently than line-by-line if there is a bug in the parser.
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