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
Droid
Novice


Joined: 28 Aug 2003
Posts: 49

PostPosted: Mon Sep 08, 2003 10:14 pm   

Finding a room just on specific zone
 
Ok,the way to find a room,and put its vnum into a variable is:

#CALL %mapfilter(%concat("Name LIKE '%",%-1,"%'");#LOOP 1,%numrooms() {#ADDITEM rooms {%mapvnum(%i)}};#CALL %mapfilter("")}

I read something about having to know the zone ID,and thats not a problem.
How to restrict the search just to 1 zone? i tryed:
("Name LIKE '%",%-1,"%'" and Zoneid like 'numberofthezone')
but didnt get anything :|

Another question,could i get a search and obly this to fit just some vnums,and if this room search gives results different from the vnums,thoose different matches arent recorded?

thank you for all your help,im discovering Zmud is a GREAT program,but the thing makes it really impressive is the way we are helped on forums :)
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Sep 08, 2003 10:57 pm   
 
I believe SQL is particular about its punctuation and case. Try:
#CALL %mapfilter(%concat("(Name LIKE '%",%-1,"%') AND (ZoneID = ",%zonenum(),")"))
Reply with quote
Droid
Novice


Joined: 28 Aug 2003
Posts: 49

PostPosted: Fri Sep 12, 2003 10:12 am   
 
#alias findroom {#CALL %mapfilter(%concat("(Name LIKE '",%-1,"') AND (ZoneID = ",@zone,")")));#LOOP 1,%numrooms() {#ADDITEM rooms {%mapvnum(%i)}};#CALL %mapfilter("")}

It doesnt seem to recognice @zone,cause on the menu it doesnt appear in blue as other variables,if i use that alias,all rooms on the map will match.
I tryed by doing 2 if,
#if (@zone="myzonename1") ... ... ZoneID = ",MYZONENUMBER,")")))....
#if (@zone="myzonename2") ... ... ZoneID = ",MYZONENUMBER2,")")))....
My zone number is a real value like 4 for example.
That didnt work... What now?? Sad
Reply with quote
Droid
Novice


Joined: 28 Aug 2003
Posts: 49

PostPosted: Fri Sep 12, 2003 10:17 am   
 
wooooops now posted here i saw the bug ^^

#alias findroom {#CALL %mapfilter(%concat("(Name LIKE '",%-1,"') AND (ZoneID = ",%zonenum(@zone),")")));#LOOP 1,%numrooms() {#ADDITEM rooms {%mapvnum(%i)}};#CALL %mapfilter("")}

[^]
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