quote:
Originally posted by Spunky
Not 100% without looking a bit further into it, buttry changing the variable Messenger to Msgr or something similar. I think it might be conflicting with the object Messenger
Very correct. To make it even worse, you're trying to use Messenger in the same scope in both meanings (the object and your number variable) - there's absolutely no way the engine will be able to work with that.
Also, I'd recommend you to use a Boolean value for your Activity and Mode variables. It is totally unnecessary to force the JScript engine into comparing two strings when you know it can only have two values. Try to give your Mode variable a better name, or start using number constants for your settings, it'll greatly improve the quality of your code.