What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » global variable not working

global variable not working
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: global variable not working
You create a global variable by creating it outside the scope of functions hence the top of the script. However if Messenger isn't signed in then the object Messenger.MyName doesn't exist and will cause the script to stop and never start when they sign back in.

That is why my code I create the global variable outside of the scope but declare it as a string instead of Messenger.MyName.

Also the script wont run on Initialize because it catches an error if the user isn't signed in. And when they are signed in it will recall Initialize function.

This is a much better practise. Or instead of try() you can use if (Messenger.MyStatus > 2)
07-24-2007 02:28 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
global variable not working - by scutterman on 07-23-2007 at 09:30 PM
RE: global variable not working - by roflmao456 on 07-23-2007 at 10:33 PM
RE: global variable not working - by albert on 07-23-2007 at 10:56 PM
RE: global variable not working - by scutterman on 07-23-2007 at 11:07 PM
RE: global variable not working - by Spunky on 07-23-2007 at 11:39 PM
RE: global variable not working - by matty on 07-24-2007 at 02:10 AM
RE: global variable not working - by albert on 07-24-2007 at 02:21 AM
RE: global variable not working - by matty on 07-24-2007 at 02:28 AM
RE: global variable not working - by scutterman on 07-24-2007 at 09:07 AM
RE: global variable not working - by matty on 07-24-2007 at 01:16 PM
RE: global variable not working - by markee on 07-24-2007 at 01:54 PM
RE: global variable not working - by scutterman on 07-24-2007 at 03:17 PM
RE: global variable not working - by matty on 07-24-2007 at 03:55 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On