|
Rathern Newbie
Joined: 02 Apr 2004 Posts: 5 Location: New Zealand
|
Posted: 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. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: 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'}) |
|
|
|
Rathern Newbie
Joined: 02 Apr 2004 Posts: 5 Location: New Zealand
|
Posted: Sat Apr 03, 2004 2:21 am |
Cheers, that is fantastic.
Arggggg!!!! *pulls out hair*
All better |
|
|
|
|
|