Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Zillat
Newbie


Joined: 31 May 2008
Posts: 8

PostPosted: 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
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: 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".
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: 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... ;)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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