Try place it in new file on your mIRC Script Editor.
ALT+R -> File -> New
EDIT: That code is working only on #nacknic channel.
Also you can read the full ON NOTICE event help file description
/help on notice or from the online (unofficial) wiki
https://en.wikichip.org/wiki/mirc/on_events/on_notice