What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » adding a counter to my script.

adding a counter to my script.
Author: Message:
laurenz
Junior Member
**


Posts: 23
Joined: Sep 2005
O.P. Huh?  adding a counter to my script.
Hello!

i have made a script for my friend.
its a script that gives a random riddle whenever the button gets pushed.
But now i want to count how many times the button gets pushed, so i tried to add a counter.
It worked quite well, but then ofcourse i wanted it to save the number for the next time when he logs in.
i tried to get pieces of other message-counting scripts, and paste them in mine, and update things to match my script.
but it just doesn't seem to work at all.
so now im asking if anyone can update my script  and make it save the number it has counted for later use?

I have already put in the counting part, i only need a piece in the script that saves and loads the counted number. The number is in the variable called 'count'.

Heres the code:
code:
var RaadselId = Array();
var teller = 0;

function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind)
{
     var Message=Message.toLowerCase();


    if(MessageKind == 1 && Message.substr(1,4) == "druk")
    {   

        var ranNum = Math.floor(Math.random() * Raadsel.length);
       
        RaadselId[ChatWnd.handle] = ranNum;
       
        ChatWnd.SendMessage(Raadsel[ranNum]);

        teller++;

    }

   
    if(MessageKind == 1 && Message.substr(0,7) == "ik wens" || Message.substr(0,8) == "antwoord" || Message.substr(1,9) == "antwoord")
    {   

        ChatWnd.SendMessage(Antwoord[RaadselId[ChatWnd.handle]]);

    }
}
i know the arrays 'antwoord' and 'raadsel' aren't there, because i deleted them now, they aren't usefull and they add up a lot of useless space.

This post was edited on 08-17-2006 at 03:23 PM by laurenz.
08-17-2006 03:22 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
adding a counter to my script. - by laurenz on 08-17-2006 at 03:22 PM
RE: adding a counter to my script. - by Matti on 08-17-2006 at 03:38 PM
RE: adding a counter to my script. - by laurenz on 08-17-2006 at 03:48 PM
RE: adding a counter to my script. - by Ezra on 08-17-2006 at 05:07 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