Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
adamwalker
Apprentice


Joined: 12 Mar 2005
Posts: 195

PostPosted: 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%'")
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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.
Reply with quote
adamwalker
Apprentice


Joined: 12 Mar 2005
Posts: 195

PostPosted: Tue Nov 28, 2006 10:26 am   
 
yeah, that works now thanks zugg.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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