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
atraeyu
Novice


Joined: 29 Dec 2006
Posts: 41
Location: Chester, VT

PostPosted: Mon Jan 01, 2007 5:37 am   

Pulling ALL line test with an alias
 
I'm having problems with alias that work like this:
#ALIAS s($text) say $text

Works perfect if you only say 1 word. If you say more than word, only the first word is output, for example:

say hello world
outputs
hello

How do I make it output everything?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Jan 01, 2007 6:21 am   
 
I seem to recall that Zugg did away with the %-1 stuff? I think you use %params() or some other newer function that does the same thing. I'm not in much shape right now to go looking, but fairly sure it's all pretty obvious.
_________________
EDIT: I didn't like my old signature
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Jan 01, 2007 1:13 pm   
 
Each local variable only picks up parameters in order. You need to group it into one parameter with curly braces {} or quotes ""

s "something something something"
s {something something something}

If you want to use all parameters you either use %-1 or the %params function, which is exactly the same as %-nn.

So your alias will be:

#alias s {say %-1}
#alias s {say %params}
Reply with quote
atraeyu
Novice


Joined: 29 Dec 2006
Posts: 41
Location: Chester, VT

PostPosted: Mon Jan 01, 2007 5:54 pm   
 
Awesome, thanks!
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