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


Joined: 03 Jan 2002
Posts: 152
Location: USA

PostPosted: Tue Nov 09, 2004 4:54 am   

making a #mapquery alias
 
I know this is insanely simple, i just cant get my syntax right....

All i want to do is have an alias, mq, that will #MAPQUERY on %1.

Here's what i did:

#ALIAS mq {#MAPQUERY {[Name] LIKE '%%1%'}}

typing mq Crypt show's totally different results than typing out the full #MAPQUERY {[Name] LIKE '%Crypt%'} at the command line

I know it has something to do with the % signs, just not sure what to do here.

Thanks
Reply with quote
mortie
Wanderer


Joined: 26 Sep 2002
Posts: 73
Location: United Kingdom

PostPosted: Tue Nov 09, 2004 7:53 am   
 
Heya,

Try

#ALIAS mq {#mapquery {[Name] LIKE '%"%-1"%'}}

I use %-1 so i can search on more than one word
Reply with quote
doomfyre
Apprentice


Joined: 03 Jan 2002
Posts: 152
Location: USA

PostPosted: Tue Nov 09, 2004 1:38 pm   
 
That works, thanks Mortie.

I always read about %-1 being unsupported though. Is there a "right" way to do it? I'll definitely use this, just wanna know the "other" way too, for future reference.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Tue Nov 09, 2004 2:39 pm   
 
say %-1 is correct and documented for #Aliases
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Tue Nov 16, 2004 6:02 pm   
 
%param(0) is the "right" way.
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