Lol. You aren't having much luck tonight. It doesn't make sense if it doesn't work at the top of the script, but works on a new script, and doesn't work if the whole thing is on a new script.

(did you remember to unload the original?)

At that point, I might suggest sending the full script file to someone else to test and see if it is the script or something with your mIRC. As I mentioned, I don't get an unknown identifier error if it's not loaded.