 |
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Tue Nov 28, 2006 1:15 am
use of %MAPQUERY in cmud |
trigger which finds a room from a string sent by the mud....
doesnt seem to work in cmud as @foundrooms has no result. any ideas please?? thanks
trigger
^An image of (*) at (*) appears*
value
foundrooms = %MAPQUERY( Name LIKE '%@room2find%')
#say @foundrooms
edit
the following will show a result. so i know its not my mapper. its just the syntax of the above when i get the data from a variable. but i cant quite work out the syntax
foundrooms = %MAPQUERY( "Name LIKE '%road%'") |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Nov 28, 2006 2:10 am |
You need to form a proper string argument for %mapquery:
foundrooms = %mapquery( %concat( "Name LIKE '%", @room2find, "%'"))
The problem is that you have % in your string, and that's a special character in CMUD, which is why your original line probably doesn't even compile. |
|
|
|
 |
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Tue Nov 28, 2006 10:26 am |
yeah, that works now thanks zugg.
|
|
|
|
 |
|
|
|