What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Uptime script, why doesn't it work?

Uptime script, why doesn't it work?
Author: Message:
CrAzY_KeBaB
New Member
*


Posts: 6
Joined: Sep 2006
O.P. RE: Uptime script, why doesn't it work?
Now, it simply stays on Time Online: 0 Hours, 0 Mins, 0 Seconds

What have i done wrong?

code:
var s=0,m=0,h=0,d=0;

function OnEvent_Initialize(MessengerStart)
{
    MsgPlus.DisplayToast("P.M. Time", "Displays uptime as personal message.");
    MsgPlus.AddTimer("second", 1000);
}

function OnEvent_Timer(id)
{
    if(id=="second")
    {
        s+s+1;
        if (s==60)
        {
            s=0;
            m=m+1;
        }
        if (m==60)
        {
            m=0;
            h=h+1;
        }
        if (h==24)
        {
            h=0;
            d=d+1;
        }
        if (m==0)
        {
            uptime="Time Online: " + s + " Seconds";
        }
        if (h==0)
        {
            uptime="Time Online: " + m + " Minutes, " + s + " Seconds";
        }
        if (d==0)
        {
            uptime="Time Online: " + h + " Hours, " + m + " Minutes, " + s + " Seconds";
        }
        if (d!=0)
        {
            uptime="Time Online: " + d + " Days, " + h + " Hours, " + m + " Minutes, " + s + " Seconds";
        }
        Messenger.MyPersonalMessage=uptime;
        MsgPlus.AddTimer("second", 1000);
    }
}

09-16-2006 11:00 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Uptime script, why doesn't it work? - by CrAzY_KeBaB on 09-16-2006 at 10:07 PM
RE: Uptime script, why doesn't it work? - by Silentdragon on 09-16-2006 at 10:29 PM
RE: Uptime script, why doesn't it work? - by CrAzY_KeBaB on 09-16-2006 at 11:00 PM
RE: Uptime script, why doesn't it work? - by Silentdragon on 09-16-2006 at 11:13 PM
RE: Uptime script, why doesn't it work? - by CookieRevised on 09-17-2006 at 12:18 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