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
quartz
Newbie


Joined: 16 Jul 2002
Posts: 8
Location: USA

PostPosted: Mon Jun 23, 2003 7:30 pm   

wild and wolly
 
I like zmud for it's range but this is the wooliest code ever devised. I try to insert varables in mxp statements in 40 different ways and ur prog decides I want temp triggers which don't work under other conditions. I wonder if ur getting ****z and giggles at my expese. if so, may it come back to you
Reply with quote
Lalaynya
Wanderer


Joined: 23 Aug 2002
Posts: 96

PostPosted: Mon Jun 23, 2003 8:07 pm   
 
Don't know about everyone else, but I always get a lot of enjoyment from fools like you.

Post a question, or request, or shut up.




*Please note that my views do not reflect the views of Zuggsoft nor am I affiliated with them in anyway, so don't bother whining to them about my response*
Reply with quote
Darker
GURU


Joined: 24 Sep 2000
Posts: 1237
Location: USA

PostPosted: Mon Jun 23, 2003 8:24 pm   
 
Ouch, that was a wee harsh. I'd have said it like this: It's complex because it has to be. You can't have lots of flexibility in a simple language. The upshot is, you can always ask how to do things here, and get the answer, and usually a lot of good ideas that can be applied elsewhere, too.
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Jun 23, 2003 8:34 pm   
 
Well, and to add:

Posting something more specific, like the actual MXP code you are trying to use, would also help.
Reply with quote
quartz
Newbie


Joined: 16 Jul 2002
Posts: 8
Location: USA

PostPosted: Tue Jun 24, 2003 12:36 pm   
 
Glad to help out Lalaynya. And sorry Zugg for the angry post, It's just sometimes the errors I created seem more purposeful then they really are. I suppose programming on this level has too many rules for me.

Rather then go into the yards of frustrating and (silly) attempts at trying to combine, expand, or escape variables, does the MXP processor have the ability to use trigger input on the fly?

Basically I want a trigger that will #sub ~<send "exa %1"> %1 ~</send> %2
Reply with quote
Lalaynya
Wanderer


Joined: 23 Aug 2002
Posts: 96

PostPosted: Tue Jun 24, 2003 3:08 pm   
 
Ah-HA! A question!

I don't have something that uses %1, but I'm using the following in a trigger:

#sub {~<a href=%trigger>%trigger~</a>}


The problem is that if you use #sub with more than one parameter, it DOES create a trigger(by design!)... the solution is to use the curly braces to show zMud that you want the whole thing to be the first parameter.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Jun 24, 2003 4:39 pm   
 
Yeah, what Lalaynya said. Appling that example to your case, what you want is:
#SUB {~<send "exa %1"~> %1 ~</send~> %2}
Reply with quote
quartz
Newbie


Joined: 16 Jul 2002
Posts: 8
Location: USA

PostPosted: Wed Jun 25, 2003 12:27 am   
 
#SUB {~<send "exa %1"~> %1 ~</send~> %2} returns an empty %1 due to the quotes. Trying to use quotes as text in ZMud is exhausting for me. Functions treat their own commas weirdly and the parsing is unpredictable. Spose I will try to expand an ascii function but my apathy expects to see whatever rendered literally. Thanks though, I can always generate an error and trigger the exa person on the notification, but that's poor [:I].
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Jun 25, 2003 11:14 am   
 
Use single quotes in MXP tags. Looking at the specification page in the Support Library and every example of MXP in the help file shows that this is the way to do it.
Reply with quote
quartz
Newbie


Joined: 16 Jul 2002
Posts: 8
Location: USA

PostPosted: Wed Jun 25, 2003 2:58 pm   
 
Though how to expand variables inside quotes was a problem. Now ZMud refuses to acknowlege the string 'exits:' at all, even for dragon realms. This seems a tad motivated (to me). Suppose I can go kill lily leaf beetles, winter moths, aphids, spider mites, and earwigs. The xp is good this time of year. [:p]

ta
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jun 25, 2003 7:25 pm   
 
Yes, quotes can be a pain sometimes. The solution, as with *any* programming language, is to either use the "other" set of quotes (single vs double) or to "escape" the quotes to prevent zMUD from treating them specially.

Here are two triggers that I had no problem getting to work:
Pattern: (%w) says (*)
Value: #SUB {<SEND href='exa %2'>%1</SEND>}
or
Value: #SUB {<SEND href=~"exa %2~">%1</SEND>}

If you posted your exact trigger, then we could probably help more. In general, the more info you post, the better help you'll get.

The %1..%99 variables are not expanded like @var variables. %1..%99 are done as string replacements before the commands are parsed, and do not care whether they are within quotes or not.
Reply with quote
quartz
Newbie


Joined: 16 Jul 2002
Posts: 8
Location: USA

PostPosted: Fri Jun 27, 2003 1:41 am   
 
You have enterd a dense forest.
a mind is here

thanks Smile
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