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


Joined: 02 Apr 2004
Posts: 5
Location: New Zealand

PostPosted: Fri Apr 02, 2004 8:29 pm   

Can you Use a Variable in %mudquery
 
Quite simple.

Must be syntax that im lacking, ive searched the forums and help and havent been able to find my answer, all the examples show a hard coded room reference.

This function works and will return a room number:

#SHOW %mapquery( "[Name] LIKE 'Palladium Gate Walk'")

This function dosent work:

#SHOW %mapquery("[Name] LIKE" @room_string)

Notes:
The variable room number has a value of 'Palladium Gate Walk'

I want to use %mapquery with a variable #MAPQUERY works with a variable but it pops up the box of rooms that match.

This must be a simple thing im just blind to it. Ive tried numerous combinations, the syntax ive used dosent cause an error it just dosent work, it evaluates exactly the same as the hard coded example that does work.

thanks for any help.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Apr 02, 2004 11:33 pm   
 
Quote it correctly :P use "" takes it as literal and will not expand anything while using {} will expand. Dont worry it gave me hell for about 30 mins when I updated my mapper flee script to use %mapquery then I looked at the help for #MAPQuery and seen {} and relized right away what I was doing wrong.

#SHOW %mapquery({[Name] LIKE '%@room_string%'})
#SHOW %mapquery({[Name] = '@room_string'})
Reply with quote
Rathern
Newbie


Joined: 02 Apr 2004
Posts: 5
Location: New Zealand

PostPosted: Sat Apr 03, 2004 2:21 am   
 
Cheers, that is fantastic.

Arggggg!!!! *pulls out hair*

All better
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