Phazic Novice
Joined: 12 Oct 2000 Posts: 32 Location: USA
|
Posted: Sun Dec 29, 2002 5:37 am
Problem deleting links via COM |
I'm doing some tests doing some zMapper scripting and wondering why the following script doesn't seem to work.
Start Zmud
Start Automapper
Make a new map
#CALL %map.newroom(%null,%null,0,0,0,0,-1)
#CALL %map.newroom(%null,%null,240,0,0,0,-1)
#CALL %map.newlink(1,2,0,4,0,%null,1)
#CALL %map.curroom.deletelink(2,0,%null)
The last command doesn't delete anything although all the other commands seem to work.
To make it even more general I tried the following command:
#CALL %curroom.deletelink(-1,0,%null)
This also didn't work so I made it even more general
#CALL %curroom.deletelink(%curroom.linknum(0).toid,%curroom.linknum(0).dir,%curroom.linknum(0).command)
This also didn't work.
Although the following command successfully killed the link:
#VAR link %curroom.link
#CALL @link.delete(1)
Things get more interesting when I close the mapper and reopen it if I don't delete the link with the VAR command:
Setting the mapper to map mode on reopening
#SH %curroom.numlinks is 0
#SH %curroom.id is 1
#SH %map.getroom(1).numlinks is 1 and %map.getroom(1).id is 1
but %map.curroom.numlinks returns 1 so it seems like %curroom isn't being updated properly.
Oddly enough, the call to %map.curroom.deletelink(-1,0,%null) now works.
Anyone have any ideas?
Not real sure where this post goes as it concerns the %curroom COM obj in Zmud but COM functions within Zmapper.
-Phazic
zMapper 1.15/zMUD 6.40 on WinXP |
|