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
patryn
Apprentice


Joined: 26 Sep 2001
Posts: 124

PostPosted: Sun Jan 16, 2005 5:35 am   

Confused... %roomnum %roomvnum
 
Um...

Ive read up on it and ive searched the forums for it and it all looks good... except for one thing.

From researching ive come to understand that %roomvnum should be used for map manipulation with the various functions available, and %roomnum is used for direct database filtering.

Now the thing is... ive had zmud for oh... three years or so. I've NEVER used %roomvnum for _ANYTHING_. Ive always made use of %roomnum.

The interesting thing is, i upgraded to 7.05a. That's fair enough, because i started re-coding all my scripts from scratch, so i figure if there was a difference with the way %roomnum and %roomvnum worked id notice it early on....

BUt the thing is, ive coded stuff using %roomnum in the past two weeks, and it worked great.. until about a couple of days ago. I checked out what the problem was and found that if i replaced %roomnum with %roomvnum everything works how its sposed to.

Now my question is. Is there a switch somewhere that i accidently flicked to cause %roomnum and %roomvnum to act differently?
Im willing to swear on my life that up until a couple of days ago %roomnum worked just like %roomvnum does now.

Example:

#noop %roomcol(%roomnum(),red) <--- This used to work 2 days ago
#noop %roomcol(%roomvnum(),red) <--- Now i have to use this



I realise this isnt a big deal... except that if i _did_ flick some switch somewhere, i dont want to do it again after i change all the %roomnum() to %roomvnum()


Greatful for any info regarding this, as im sure im slowly going insane trying to figure it out.
_________________
That which does not kill us, makes us stronger.
Reply with quote
patryn
Apprentice


Joined: 26 Sep 2001
Posts: 124

PostPosted: Sun Jan 16, 2005 6:31 am   
 
*sigh*

It figures that id find the %roommode function after posting.
Ok.. so now i know there is a switch, but im having trouble converting previously stored %roomnum values into the correct %mapvnum values.

(I've already updated my scripts to use %mapvnum instead of %roomnum)

Example:

Previously mapped %roomnum: 12093
Correct %mapvnum for this room is: 2671
#show %mapvnum(12093) returns: 13001
_________________
That which does not kill us, makes us stronger.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Jan 16, 2005 4:38 pm   
 
%mapvnum and %roomvnum are synonyms. They return either vNums or keys based on %roommode and when a numeric parameter is use they look at the current absolute position of the room in the %mapfilter query. Hence if your %mapfilter results in 100 qualifying rooms then %mapvnum will be valid with an parameter of 1 to 100.

%roomnum is not affected by the %mapfilter and always returns vNum irregardless of %roommode. The expected parameter is changed by %roommode, when set this expects keys instead of vNums
%roomkey is not affected by %mapfilter and always returns key irregardless of %roommode. The expected parameter is always vNum irregardless of %roommode.

I think I have to change the help on all of them.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
patryn
Apprentice


Joined: 26 Sep 2001
Posts: 124

PostPosted: Mon Jan 17, 2005 12:17 pm   
 
Ah, so what im after is:

%roomkey("previously_recorded_roomnum")

Thanks heaps Very Happy
_________________
That which does not kill us, makes us stronger.
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