|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: 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 |
|
|
|
Dharkael Enchanter
Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: 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." |
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Thu May 15, 2008 7:16 pm |
that worked! thanks chief!
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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.
|
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Thu May 15, 2008 9:39 pm |
whats the actual difference then?
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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. |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: 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 |
|
|
|
|
|