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
haiku
Wanderer


Joined: 19 Nov 2004
Posts: 70

PostPosted: Sun Sep 30, 2007 9:45 pm   

help with a trigger and spaces not being added to commands
 
Lets say I have this trigger
Code:
#IF (%ismember(%1, @Forbidden)) {#SHOW FORBIDDEN COMMAND} {%1  %2}

that works off of this input:
Code:
@tank tells you:*"do (%w) %2"$


When I receive this input:
Code:
Snargle tells you: "do dance lightn"

I get this output:
Code:

dancelightn


I'd like to get the space that I added in between the %1 and the %2 to register. How do I make that happen?
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sun Sep 30, 2007 9:53 pm   
 
#exec %1 %2

Lines must start with commands (or aliases that expand into commands) or literal text you want sent to the MUD. Also, you have two spaces there, not one - if you want both, you might need to add "quotes" round them or the parser might remove one.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Oct 01, 2007 5:39 pm   
 
Also, what are you trying to do with
Code:
%1  %2

That is undefined. If you are trying to execute them as CMUD commands, then Fang is correct and you should use:
Code:
#EXEC {%1  %2}

The {} will preserve spaces.

However, if you are trying to send %1 and %2 to the MUD, then you should be using the #SEND command:
Code:
#SEND {%1  %2}

Again, the {} will preserve the spaces.
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