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
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Wed Jul 02, 2008 5:47 pm   

Oninput Problem
 
Here's the oninput text:

Code:

#oninput yellow-hi {~{Y} {#sub {%xn%xh%xy}} {color substitutions}


Here's what it sends:

p Kjabbar={Ytest{x

p Kjabbar=%xn%xytest%xn

As you can see, for some odd reason, it doesn't send %xh at all, but I don't know why. Could someone help me with this?
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jul 02, 2008 7:35 pm   
 
I just tried this in a blank session in v2.30 and it worked fine.

I entered:

p Kjabbar={Ytest{x

and got the result:

p Kjabbar=%xn%xh%xytest{x

It might be a problem because the % character is for expanding functions, so if you want the #SUB to put the % character into the string, then you probably need to escape it:
Code:
#oninput yellow-hi {~{Y} {#sub {~%xn~%xh~%xy}} {color substitutions}

But it's also possible that this was a bug that was already fixed in 2.30 (although nothing obvious comes to mind that would have effected this)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Wed Jul 02, 2008 9:30 pm   
 
I had two escaped, but not all three. I tried with none escaped since one wasn't escaped when it worked before. I'll try all three escaped and see what happens.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Sun Jul 06, 2008 9:25 pm   
 
Still getting:

%xn%xyA%xn%xyn %xn%xyA%xn%xyrab %xn%xyV%xn%xyagabond%xn

when this is the code:

Code:

#oninput yellow-hi {~{Y} {#sub {~%xn~%xh~%xy}} {color substitutions}
#oninput yellow {~{y} {#sub {~%xn~%xy}} {color substitutions}


And I type {YA{yn {YA{yrab {YV{yagabond{x
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Jul 07, 2008 12:05 am   
 
You need to put the case sensitiive option on both of those oninput triggers.
Code:
#oninput yellow-hi {~{Y} {#sub {~%xn~%xh~%xy}} {color substitutions} {case}
#oninput yellow {~{y} {#sub {~%xn~%xy}} {color substitutions} {case}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Mon Jul 07, 2008 12:42 am   
 
Ah, I had before. But I didn't know there was a way to do it via command line so it likely got shut off. Thanks.
_________________
Listen to my Guitar - If you like it, listen to more
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