Code:
alias weird {
var -s %cmd $str($chr(32),$1) $+ weird1 param1 param2
%cmd
}
alias weird1 {
echo -a $!1: $1
echo -a $!2: $2
}
Executing /weird 2, the command executed when evaluating %cmd is " weird1 param1 param2" with two spaces in front of the command.
However, here it doesn't trim the spaces when tokenizing parameters, which results in $1- being shifted, the first parameter $1 returns the name of the alias being called, and $2 the real first parameter etc..
Executing /weird 0 works as expected, I'd expect the two spaces to be trimmed. Tested on 7.32


#mircscripting @ irc.swiftirc.net == the best mIRC help channel