Yeah, that was a syntax error on my behalf hehe, was busy with other stuff at time of test/post : )
To original poster, try moving the script down to the bottom of the script order (mIRC Editor, File, Order...) and have the on load in its own script file. This should initiate it right at the end after everything else. Letting you determine if or not there is an issue with another of the loaded scripts unsetting variabals.