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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Fri Jun 06, 2008 3:22 am   

[2.26] %mapquery
 
Why isnt this showing anything?

Code:

#VAR QuestDB {Room=Paul's Chambers}
#SHOW %mapquery("[Name] like '%replace( %db( @QuestDB, Room), "'", "''")%'")


If I do

Code:

#SHOW %mapquery("[Name] like 'Paul''s Chambers%'")


I get the correct vnum.
Reply with quote
alluran
Adept


Joined: 14 Sep 2005
Posts: 223
Location: Sydney, Australia

PostPosted: Fri Jun 06, 2008 3:29 am   
 
Code:

#SHOW %mapquery("[Name] like '"%replace( %db( @QuestDB, Room), "'", "''")"%'")
_________________
The Drake Forestseer
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Jun 06, 2008 4:22 am   
 
Alluran is correct. For those that keep staring at it to figure out the cause, the original script had the %replace function within " quotes, and in CMUD, nothing is evaluated within quotes. In Alluran's example, the %replace is outside the quotes and he is using implicit concat to add the result to the literal string in the quotes.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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