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

Post new topic  Reply to topic     Home » Forums » zMapper Discussion

Joined: 12 Oct 2000
Posts: 32
Location: USA

PostPosted: Sun Dec 29, 2002 6:38 pm   

Room existence querying?
Is there a function or property that specifies whether or not a room actually exists or not? Ie %map.getroom(-200) where -200 doesn't really exist creates a 'dummy' type room that has an id of -200 and no real discernible means of identifying whether or not it's an actual room without running a direct query on the map db file via ADO.

zMapper 1.15/zMUD 6.40 on WinXP
Reply with quote
The Raven

Joined: 13 Oct 2000
Posts: 463

PostPosted: Mon Jan 06, 2003 1:47 am   
I know it is not aligned with the syntax of most of Zugg's scripting, but this behavior is one of my least favorite aspects of zMud scripting... query functions that double as create/insert functions. EVIL! Especially when you name the function 'get', implying that it is used to GET stuff, not SET.

Grrr, evil... grrr.... growl...
Reply with quote

Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Jan 06, 2003 12:21 pm   
Use %mapvnum. Granted, it is not a zMapper function, but it does return -1 when the specified room doesn't exist.

Reply with quote

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

PostPosted: Tue Jan 07, 2003 1:07 am   
I'll be modifying the %isnull routine so that it can detect null "COM" objects such as this. Then you can do something like:

#VAR room %map.getroom(-200)
#IF {%isnull(@room)) {whatever}

to detect if a null room is returned. This has nothing to do with the GET/SET issue. It has to do with how COM works on Windows and the fact that GetRoom is returning a COM OBJECT and not just some simple value.

Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMapper 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 on