What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [HELP] Messenger.MyPersonalMessage won't assign to variable?

[HELP] Messenger.MyPersonalMessage won't assign to variable?
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [HELP] Messenger.MyPersonalMessage won't assign to variable?
code:
var chat_window;
var TheOldPm;

function OnEvent_ChatWndSendMessage(ChatWnd, Message){
    chat_window = ChatWnd;
    Command = Message.split(' ')
    switch ( Command[0].toLowerCase() ){
        case "/testing" :
            var i = 0;
            TheOldPm = Messenger.MyPersonalMessage;
            MsgPlus.AddTimer("testing", 1000 );
            Message = '';
            return "";
            break;
    }
    return Message;
}

function OnEvent_Timer(TimerId) {
    switch(TimerId){
        case 'cuptime':
            i++
            if(i < 60){
                Messenger.MyPersonalMessage = "Timing... " + i + " Minutes have passed";
                MsgPlus.AddTimer('cuptime', 60000);
            }
            else{
                Messenger.MyPersonalMessage = TheOldPM;
            }
            break;
    }
}

The problem is is that you are declaring TheOldPm inside a function making it local to the function, however you are trying to use a variable called MyOldPm.

This post was edited on 08-10-2007 at 12:53 AM by matty.
08-10-2007 12:50 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[HELP] Messenger.MyPersonalMessage won't assign to variable? - by Kriogenic on 08-10-2007 at 12:17 AM
RE: [HELP] Messenger.MyPersonalMessage won't assign to variable? - by GNSPS on 08-10-2007 at 12:26 AM
RE: [HELP] Messenger.MyPersonalMessage won't assign to variable? - by Spunky on 08-10-2007 at 12:26 AM
RE: [HELP] Messenger.MyPersonalMessage won't assign to variable? - by Kriogenic on 08-10-2007 at 12:33 AM
RE: [HELP] Messenger.MyPersonalMessage won't assign to variable? - by Spunky on 08-10-2007 at 12:34 AM
RE: [HELP] Messenger.MyPersonalMessage won't assign to variable? - by GNSPS on 08-10-2007 at 12:39 AM
RE: [HELP] Messenger.MyPersonalMessage won't assign to variable? - by matty on 08-10-2007 at 12:45 AM
RE: [HELP] Messenger.MyPersonalMessage won't assign to variable? - by Kriogenic on 08-10-2007 at 12:45 AM
RE: [HELP] Messenger.MyPersonalMessage won't assign to variable? - by GNSPS on 08-10-2007 at 12:50 AM
RE: [HELP] Messenger.MyPersonalMessage won't assign to variable? - by matty on 08-10-2007 at 12:50 AM
RE: [HELP] Messenger.MyPersonalMessage won't assign to variable? - by Spunky on 08-10-2007 at 12:52 AM
RE: [HELP] Messenger.MyPersonalMessage won't assign to variable? - by Kriogenic on 08-10-2007 at 12:55 AM


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