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
Zistrosk
Beginner


Joined: 26 Aug 2001
Posts: 12
Location: USA

PostPosted: Sat Jul 30, 2005 5:09 pm   

Auto Disable "Allow [] for eval (local)"
 
(Zmud v7.05, stable as a rock)

Where is the command to turn off "Allow [] for eval (local)" on the fly?

I'm writing a set of triggers and aliases for a wide audience, and I don't want to have to include a long set of how-to-configure-zmud instructions. I should be able to do this automatically. I need this feature turned off for my trigger set, but once it is done I need to be able to turn it on in case the user has other settings that might need it.

Failing that, how do I keep %concat from evaluating [] when what I really want is the "[" and "]" characters inserted into a string? Here's the code snippet:

#var istr23 %concat(@istr23,"[P]")

What I get in istr23 is the letter P with no [] around it. The [] do show up with the "Allow [] for eval (local)" turned off. But even using %char to insert them causes them to be evaluated. Putting a tilde ~ in front of them had no effect either.

However, I absolutely have to have the [] around it, because the external database program I'm going to put the output of this trigger set into requires the square brackets. It's not like I could give it curly braces or anything else, it would just error out.

Thanks and best regards,

Zistrosk
Reply with quote
Full Throttle
Wanderer


Joined: 07 Dec 2004
Posts: 65

PostPosted: Sat Jul 30, 2005 7:35 pm   
 
Try using the %quote function.

#var istr23 TEST
#var istr23 %concat(@istr23,"[P]")
#echo %quote(@istr23)

The output should be the same for both preference states.
Reply with quote
Zistrosk
Beginner


Joined: 26 Aug 2001
Posts: 12
Location: USA

PostPosted: Sat Jul 30, 2005 8:12 pm   
 
Thanks for the %quote, but that didn't fix it.

The mouseover shows that the %concat function completion didn't put the [] square brackets into the istr23 variable at all.

%quote verified that the square brackets are indeed missing, and have been stripped by the evaulation routine.

is there a way to concat with %quote? maybe that would fix it.

Many thanks,
Zistrosk
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat Jul 30, 2005 8:53 pm   
 
#var istr23 %concat(%quote(@istr23),%quote("[P]"))
#SAY %quote(@istr23) // any time you need to display it just %quote it!
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Zistrosk
Beginner


Joined: 26 Aug 2001
Posts: 12
Location: USA

PostPosted: Sat Jul 30, 2005 9:13 pm   
 
Okay, something's wrong. What am I doing wrong here?
#var istr23 {"good"}
#var istr23 %concat( %quote( @istr23), %quote( " [L]"))
#say istr23 %quote( @istr23)

and I get:

istr23 good L

No brackets.

Any ideas?

Thanks,

Zistrosk
_________________
Zistrosk the Goody Two-Shoes
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sun Jul 31, 2005 12:35 am   
 
Possibly a bug in 7.05? Try upgrading to the latest version, My example was tested and worked correctly on 7.13
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Zistrosk
Beginner


Joined: 26 Aug 2001
Posts: 12
Location: USA

PostPosted: Sun Jul 31, 2005 2:34 am   
 
Well, it's pretty much done.

For the full thing, please see:

http://208.56.171.54/rod_db_triggers.html

(or go to www.dcdruids.org, click on the green druid, click on equipment on the left, click on the top Download RoD Database link on the left, click on the link about half way down that says you can click here to get an idea how they work)

Thanks again for the advice.

Best regards,
Zistrosk
_________________
Zistrosk the Goody Two-Shoes
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