I believe that's a typo. Here is it, which looks better and less messy:
on *:text:!userlist*:#: {
if (!$2) { msg # 4USAGE: !userlist <channel> }
elseif ($me !ison $2) { msg # 4ERROR: I can't scan $2 as I'm not in it. }
else { var %u = 1 | while (%u <= $nick($2,0)) { msg # 12 $+ %u $+ : $nick($2,%u) | inc %u } }
}