You did close those { at the end right? There's a button {} in top right of editor, click that and see if it complains.
And maybe let's start with this
on *:snotice:*did a /whois on you*:echo -s SNOTICE: $1-
If this gives a echo when someone whois's you, then we can start expanding. Please also send us one line of output of this script, or the notice, so we can see what you want to do.
That's the best way to script: start small, debug, then expand some and debug again etc. If you write a large script at once, and then find it doesn't work, it might take you more time to find and fix all errors than to write a new one...