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
ToyMage
Apprentice


Joined: 01 Sep 2005
Posts: 120

PostPosted: Thu Oct 13, 2005 6:07 am   

HELP DEBUG
 
This is one of my alias, "QF"

#MAPQUERY {[Name] LIKE ~'%@QuestRoom%~'}


Basically i have the QuestRoom captured by a trigger. So when I type QF, it is supposed to find the room(s) and list it in database view.

BUT I have this problem... when the room name has "'" for example "Toy Mage's Home", the #MAPQUERY fails and saying error in expression and the data list is empty. Any other room names without "'" works perfectly.

How should I enclose the @QuestRoom Variable to search correctly?

Toy Mage
Reply with quote
OmegaDeus
Apprentice


Joined: 14 Sep 2005
Posts: 121

PostPosted: Thu Oct 13, 2005 7:13 am   
 
If mapquery is anything like real sql you may be able to enclose the variable in regular quotation marks instead of single quotes, if that don't work, maybe replace the ' in the name or remove it completely?
_________________


Look at me I've got zSKILLS
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Oct 13, 2005 10:27 pm   
 
A simple search of the forums would have revealed the answer. This is out of my memory banks but I think its correct.

#MAPQUERY {[Name] LIKE ~'%char(37)%replace(@QuestRoom,"'","''")%~'}
_________________
Zmud Support Library
Zmud Knowledge Base
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