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
Jhemin
Newbie


Joined: 08 Jul 2014
Posts: 5

PostPosted: Wed Jul 09, 2014 12:53 am   

#MAPQUERY command
 
Hi guys
i just discovered the command #MAPQUERY to search in my map for locations with a given name

If i write for example #MAPQUERY {[Name] LIKE '%forest%'} , cmud will search for all the rooms with contains the word 'forest' in the name.

How can i make an alias out of this?

like for example 'find %1' to specify the world that i want to look for?
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Wed Jul 09, 2014 3:33 am   
 
In my opinion, it would be cleaner to make it a function:
Code:

#FUNCTION mapquery($mask) { #IF !%null($mask) { #RETURN %mapquery($mask) } }


Example:
Code:

#VAR mask "[Name] LIKE '%forest%'"
;;
#VAR rooms mapquery(@mask)


This is as simple as it gets, but it is the idea.
_________________
Sic itur ad astra.
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