 |
Zillat Newbie
Joined: 31 May 2008 Posts: 8
|
Posted: Sat Jun 14, 2008 12:59 pm
%-1....%-99 |
What does this mean?
ALIAS:i_aff
i_add afflictions %-1; i_scanaff %1
So i go "i_aff prone" or whatever.
I know it will then go "i_scanaff prone"
but "i_add afflictions...?"
Thanks in advance |
|
|
 |
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Sat Jun 14, 2008 1:22 pm |
They are arguments passed to your alias.
If you do:
i_aff roped
Your function gets "roped" as the %1 argument. You use it by using %1. The slight alteration on the passing %-1 with the negative sign just means use all the arguments passed. So if you used
i_aff roped webbed
Using %-1 would be "roped webbed". |
|
|
 |
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Sat Jun 14, 2008 1:49 pm |
To add a bit more to that
If you do:
i_aff roped blah asdf hello
%1 would be roped
%2 would be blah
%3 would be asdf
%4 would be hello
%-1 would be roped blah asdf hello
%-2 would be blah asdf hello
%-3 would be asdf hello
%-4 would be hello
So %n takes just the nth word
%-n takes everything from the nth word inclusive |
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
 |
|
|