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: Tue Dec 02, 2008 7:44 pm   

Some problems with the Oninput
 
Right now, this trigger:

Code:

<trigger name="hiding" type="Command Input" priority="790" id="98">
  <pattern>(*)</pattern>
  <value>#IF (@idle=1 AND !%ismember(%word(%1,1),@nointerrupt))
{
  #noinput
  #exec %1
  #exec {hide}
}</value>
</trigger>


Gags certain lines, such as those starting with ; or anything with color markers in it, like {g, {c, etc... I'm trying to figure out why and if it's unavoidable?
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Dec 02, 2008 9:31 pm   
 
Try changing '#exec %1' to:
Code:
#exec {%1}

If that doesn't work, maybe:
Code:
#exec {%quote(%1)}

but I think that might not work.
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Tue Dec 02, 2008 9:53 pm   
 
The second one worked for ;

However, neither worked for anything involving color. Specifically - {Ytest{x

Perhaps if I could understand why it doesn't work I could think of something?
_________________
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: Tue Dec 02, 2008 10:00 pm   
 
You don't need {%1} or %quote.

The problem is that #EXEC is "executing" the %1 string as if it were a zScript script. For example, a line that starts with ; is a comment in zScript. So #EXEC will ignore a line that starts with a ;.

If you want to send the string to the MUD, then you should use #SEND and not #EXEC.

Also, in your last command, I'm assuming "hide" is an alias? If "hide" is an alias, then you don't need to call #EXEC. Just put it on it's own line:
Code:
#SEND %1
hide

That will execute the alias and will be faster. Remember that whenever you use #EXEC, you are specifically calling the script compiler and it will be slower.
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Tue Dec 02, 2008 11:20 pm   
 
Alright, I'll try that. I remember using exec because of order issues (i.e. the command had to come BEFORE hide was sent), but I think that's implied and I'm thinking you probably figured that out.
_________________
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