Use /var instead of /set
/help /var
Also, change \"notice\" into \".notice\" (. = silent)
And the inc %i 1 can be made inc %i.
The code should look more like this:
alias onotice {
var %c $nick($chan,0), %i = 1
while (%i <= %c) {
if ($nick($chan,%i) isop $chan) .notice $nick($chan,%i) [@] $1-
inc %i
}
}
Good work though!