Well I see what you're up to
Why do you call ShowSettings if an error occurs in LoadSettings? Just set X360Gamer (and the other 2) to an empty string (var myVar = "") and create the "Settings" window..
Also, a little note: you my use "(!MessengerStart) && (Messenger.MyStatus > 0)" instead of "MessengerStatus == false (etc)"..
And if you start Messenger, thes script will never be started, unless you hit [CTRL] + [S] in Plus!'s (ot your) editor. You may want to call OnEvent_Initialize with parameter
false when OnEvent_SigninReady occurs. It may be handy to declare a variable on the global scope with value
false to indicate the script has not yet initialised. Look:
code:
var Initialised = false;
function OnEvent_Initialize(boolMsgStart) {
if((!boolMsgStart) && (Messenger.MyStatus > 0)) {
// Whatever you want to do
Initialised = true;
}
}
function OnEvent_SigninReady(strEmail) {
if(!Initialised) { // equal to if(Initilaised == false)
OnEvent_Initialize(false);
// Whatever you want to do
}
}