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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
JQuilici
Adept


Joined: 21 Sep 2005
Posts: 250
Location: Austin, TX

PostPosted: Thu Feb 23, 2006 11:17 pm   

BUG: %pathexpand vs %exec (pls help confirm)
 
During some work on run scripts in this thread, I ran across an following anomaly which looks like a bug in %pathexpand.

To reproduce the problem, create a new character on a dummy MUD (so that you have no existing settings to interfere), click the Offline button to get a MUD window and command-line, and paste the following into the command line:
Code:
#var path1 {.nwse}
#say path1: @path1
#say "pathexpand(path1):" %pathexpand(@path1)
#say "exec(path1)      :" %exec(@path1)
#say
#var path2 {.nw;.se}
#say path2: @path2
#say "pathexpand(path2):" %pathexpand(@path2)
#say "exec(path2)      :" %exec(@path2)
#say
#var path3 {.nw;.(open door)se}
#say path3: @path3
#say "pathexpand(path3):" %pathexpand(@path3)
#say "exec(path3)      :" %exec(@path3)
#say
#var path4 {.nw;.(open door;s)e}
#say path4: @path4
#say "pathexpand(path4):" %pathexpand(@path4)
#say "exec(path4)      :" %exec(@path4)
#say


When I do so, I see the following:
Code:
path1: .nwse
pathexpand(path1): n|w|s|e
exec(path1)      : n|w|s|e

path2: .nw;.se
pathexpand(path2): n|w|.se
exec(path2)      : n|w|s|e

path3: .nw;.(open door)se
pathexpand(path3): n|w|.(open door)|s|e
exec(path3)      : n|w|open door|s|e

path4: .nw;.(open door;s)e
pathexpand(path4): n|w|.(open door;s)|e
exec(path4)      : n|w|open door|s|e

Note that %pathexpand often does not produce the proper expansion of what otherwise looks like a perfectly legitimate path - there are extraneous ".(cmd)", unexpanded sections, etc. On the other hand, %exec DOES always appear to produce the right expansion.

So....(a) can others reproduce this behavior, and (b) is this a bug, or am I misunderstanding something?

For the record: running a registered 7.21 on Windows XP Home Edition SP 2 on a Dell Inspiron 600m laptop, 1.8GHz Pentium M, 512 MB Ram @ 592 MHz, display @ 1400x1050x60Hz. Not that any of it should matter, but it's good policy...
_________________
Come visit Mozart Mud...and tell an imm that Aerith sent you!
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Sun Feb 26, 2006 10:58 am   
 
No need to create a new dummy mud. To get an offline session with no settings just press the escape button at the character screen.

I got
Code:

path1: .nwse
pathexpand(path1): n|w|s|e
exec(path1)      : n|w|s|e

path2: .nw;.se
pathexpand(path2): n|w|.se
exec(path2)      : n|w|s|e

path3: .nw;.(open door)se
pathexpand(path3): n|w|.(open door)|s|e
exec(path3)      : n|w|open door|s|e

path4: .nw;.(open door;s)e
pathexpand(path4): n|w|.(open door;s)|e
exec(path4)      : n|w|open door|s|e
_________________
Taz :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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