|
wojciech_warmuz Beginner
Joined: 27 Mar 2007 Posts: 20
|
Posted: Mon Jun 08, 2009 1:14 pm
[Solved]#alias parametrs |
why when i have: #alias sfor {#va sensesource %1 %2}
when i type: sfor tell xxx
it only puts 'tell' into sensesource variable, why not 'tell xxx'?
and what I need to do to put both words or more? it appear only to get first parametr
thanks |
|
Last edited by wojciech_warmuz on Mon Jun 08, 2009 1:20 pm; edited 1 time in total |
|
|
|
wojciech_warmuz Beginner
Joined: 27 Mar 2007 Posts: 20
|
Posted: Mon Jun 08, 2009 1:20 pm |
Ok i found it %-1 will do it
:) |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Jun 08, 2009 2:19 pm |
As for why it was behaving that way in your first try, it is because it was treating %1 as the second parameter, and %2 as the third parameter. From the documentation, the syntax for #var is:
#VA varname value defaultval classname
So, when you did {#va sensesource %1 %2}, %1 was being set as the value, and %2 was being set as the default value. To get it to work the way you wanted, you could do: {#va sensesource %concat(%1, " ", %2)} |
|
|
|
|
|