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
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Thu May 15, 2008 7:05 pm   

alias help... (easy question)
 
1. Probably easy.... I've got a reply alias. Nothing special, but its what I'm used too, and I'd rather not go old skool... LoL!

Code:
#alias {z} {reply %1}


Used to be when I type 'z blah blah blah blah blah' zmud would send to the mud 'reply blah blah blah blah blah'. But now, cmud sends 'reply blah'. What am I doing wrong here?

TIA everyone! =D

edit (figured out part 2 of my question, lol)


Last edited by shaun.murray on Thu May 15, 2008 7:13 pm; edited 1 time in total
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Thu May 15, 2008 7:07 pm   
 
Code:
#alias {z} {reply %0}

I think you can use %-1 as well.
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Thu May 15, 2008 7:16 pm   
 
that worked! thanks chief!
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Thu May 15, 2008 9:19 pm   
 
%-1 is the recommended way to do this. %0 works and will probably continue to work, but eh.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Thu May 15, 2008 9:39 pm   
 
whats the actual difference then?
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Thu May 15, 2008 9:55 pm   
 
Well, one has a zero, and one has minus one. :P

EDIT: A less fatuous answer: I believe %0 comes from the good old days of TINTIN, which zScript is very loosely based on. %-1 is a new thing, that supports up to %-n, where n is the number of parameters. %0 doesn't do that.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Fri May 16, 2008 4:04 am   
 
An example is in order.

Test is the alias name.

Test 1 2 3 4 5 6

%-1 has 1 2 3 4 5 6
%-2 has 2 3 4 5 6
%-3 has 3 4 5 6
etc
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
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