why set vars for?
alias massinvite { var %x = 1 while (%x <= $nick($1,0)) { if ($nick($1,%x) != $me) .invite $v1 $2 inc %x } }