Yes, the } was a mistake. However, no, the msg line should *not* be in the loop. As stated in my post, this prevents flooding by messaging everyone separately. It will message them all at once.
Code:
on *:text:!admin:#channel: {
var %c = 1, %t = $nick($chan,0,o)
while (%c <= %t) {
var %ops = $addtok(%ops,$nick($chan,%c,o),44)
inc %c
}
msg %ops $nick needs help in $chan $+ .
}