1. are you sure you don't have another remote script loaded which might have the mis-matched curly braces?

2. are you sure this or another script like this isn't also loaded into the aliases tab of remote script editor? The error you see is what would happen if the "RAW USERNOTICE:*:" line were in the aliases tab. MIRC would see your alias and try to execute it each time any script tries to use the raw command. If this replies $true then that's your problem:

//echo -a $isalias(raw) $isalias(raw).fname