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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
frasten
Beginner


Joined: 06 Jan 2006
Posts: 24

PostPosted: Tue Jan 08, 2008 7:00 pm   

[2.18] CMUD, COM and zMapper
 
The following code used to work, under zMud:

Code:
#echo %map.CurRoom.exitlist.item(0).doorname


but under cMud, I get:
Code:
<COMObject>.doorname


However, some zmapper scripts work, e.g.:
Code:
#echo %map.CurRoom.exitlist.count


It seems that cMud doesn't work in commands with lists, and appends the following part instead of evaluating it.
Reply with quote
frasten
Beginner


Joined: 06 Jan 2006
Posts: 24

PostPosted: Thu Dec 04, 2008 11:06 pm   
 
Bump, also with cMUD 2.37 and 3.0beta2.
However, I've discovered a workaround.

This doesn't work:
Code:
#echo %map.CurRoom.exitlist.item(0).doorname

and outputs:
Code:
<COMObject>.doorname


But if I do:
Code:
#var testvar %map.CurRoom.exitlist.item(0)
#echo @testvar.doorname

this works!

It seems that you cannot have more than 4 daisy chains: you have to split them in several COM objects...
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Dec 05, 2008 1:01 am   
 
Yep, that actually makes sense. The #VAR command has special code for detecting complete COM references. My guess it's the item(0) that messes up the normal parser. I'll add it to the bug list. Sorry this got missed before.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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