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
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Wed Dec 06, 2006 8:08 pm   

[1.19] #SUB <send>
 
I have been trouble with a script that used to work fine for me in zMUD, but now it just throws up and crashes.

#TR {%q({@crafts})%q} {#CW orange;#SUB {<send "crafts %1">%1</send>}}


When this is done several times on one line, the output becomes garbeled, so much so that the word orange gets put into the output.

Normal output:
Code:
You currently have crafts in the following areas:

   woodcraft              siegecraft             general             
   butchering             unskilled              recreation         
   athletics              fletching              foraging           
   herbalism              hunting                timberwright       
   weaponcraft   

All of these crafts are the content of @crafts btw

Output with the trigger:
Code:
You currently have crafts in the following areas:

   woodcraft              orange
#SUB {<send "crafts %1">%1</send>}             general                butchering             unskilled              recreation         
   athletics              orange
#SUB {<send "crafts %1">%1</send>}              foraging                          herbalism              hunting                timberwright       
   weaponcraft         

_________________
Discord: Shalimarwildcat
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Dec 06, 2006 8:13 pm   
 
You'll want to quote the "" quotes in the <send> tag, giving you <send ~"crafts %1~"> because otherwise CMUD will parse them out (and, I think, not expand %1). If that doesn't fix it, it could be the ({@crafts}) part, though I doubt that.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Wed Dec 06, 2006 8:51 pm   
 
Well, that made the send part work at least.. so i can in fact click on them and get what i want done.

However, multiple SUB's firing on one line still garbles the output:

Code:
You currently have crafts in the following areas:

   woodcraft              orange
#SUB {<send "crafts %1">%1</send>}             general                butchering             unskilled              recreation         
   athletics              orange
#SUB {<send "crafts %1">%1</send>}              foraging                           herbalism              hunting                timberwright       
   weaponcraft         

> UB {<send "crafts %1">%1</send>}#SUB {<send "crafts %1">%1</send>}


and it doesnt catch every single instance either... the first and third option in the first line worked, the second option was blotted out... however the second line, nothing at all happened, not even the coloring.
_________________
Discord: Shalimarwildcat
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Dec 06, 2006 9:21 pm   
 
I know there are odd reparsing issues with that I've never figured out.

Usually I make a trigger per case so there isn't multiple firings.
Reply with quote
slicertool
Magician


Joined: 09 Oct 2003
Posts: 459
Location: USA

PostPosted: Wed Dec 06, 2006 9:23 pm   
 
Change the double quotes to single quotes.
_________________
Ichthus on SWmud: http://www.swmud.org/
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Dec 06, 2006 9:27 pm   
 
You don't actually need to do that if you quote them out, slicer - or does that fix the reparsing issue too, strangely?
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Wed Dec 06, 2006 9:50 pm   
 
While ' does make it so you do not need to ~ the "s, it doesnt keep the output from being garbled.
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Wed Dec 06, 2006 9:56 pm   
 
You currently have crafts in the following areas:

woodcraft orange
#SUB {<send 'crafts %1'>%1</send>} general
butchering unskilled recreation
athletics orange
#SUB {<send 'crafts %1'>%1</send>} foraging
herbalism hunting timberwright
weaponcraft

> UB {<send 'crafts %1'>%1</send>}#SUB {<send 'crafts %1'>%1</send>}



This is how the coloring looks in the garbeledness, green is default, the cyan is done by the mud, and the orange is done by CMUD.

Also, as shown here, the even numbered lines are concatinated to the odd numbered lines, i see no reason for this as the 1 other trigger for this mud is for coloring.

PS the spacing is off cause you cant color stuff meant to be seen as code
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Wed Dec 06, 2006 10:30 pm   
 
I stripped out the two %q i was using (to force word boundries) and that helped some... if the word only appears once on a line.

If it shows up a few times however, it gets confused and garbles stuff up.

Accidently i entered the command into the mud several times (only 3-4) and it confused the system so bad that it went unresponsive. But during the time it took to type this (a minute or so) CMUD finally caught up and it had spat out over 300 lines worth of garbled output, along the lines of:

Code:
{<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}ange#orange#orange#orange#orange#orange#orange#orange#orange#orange#orange
#SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}ange#orange#orange#orange#orange#orange#orange#orange#orange
#SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}ange#orange#orange#orange#orange#orange#orange
#SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}ange#orange#orange#orange#orange
#SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}ange#orange#orange
#SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}SUB {<send 'crafts %1'>%1</send>}  orange
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Wed Dec 06, 2006 10:57 pm   
 
I seem to have found a varient that works!

#TRIGGER {({@crafts})} {#SUB {<send 'crafts %1'><color orange>%1</color></send>}}

I guess what it really didnt like was mixing mxp commands with a non-mxp color? Anyway, its working now.
_________________
Discord: Shalimarwildcat
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