What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Problem with Script - ; required? Where?

Problem with Script - ; required? Where?
Author: Message:
LifelesS
Full Member
***


Posts: 115
Reputation: 4
31 / Male / Flag
Joined: Dec 2006
RE: Problem with Script - ; required? Where?
I try to run the code myself, it just gave me an error on the:
var randomMsg = wordArray[Math.floor(Math.rand() * wordArray.length)];

Says object doesn't support this property or method, anyway, shouldn't it be easier to turn the array into an enumerator and use a for loop?

something like this:

code:
        var e = new Enumerator(wordArray)
        for(; !e.atEnd(); e.moveNext())
        {
            var word = e.item();
            if(Message.toUpperCase() == word)
            {
                ChatWnd.SendMessage(randomMsg);
                break;
            }
        }

- you had this to toUppercase() instead of toUpperCase() also

That should work, at least works for me:)
You just need to add all other things to the array and your set to go ;)
And if you're going to use many words, you can put them on a .txt file and load it to an array using split() after readall()
Best Regards,
Joćo Godinho
08-02-2007 12:00 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Problem with Script - ; required? Where? - by Toneo on 08-01-2007 at 07:22 PM
RE: Problem with Script - ; required? Where? - by Mnjul on 08-01-2007 at 08:02 PM
RE: Problem with Script - ; required? Where? - by matty on 08-01-2007 at 08:10 PM
RE: Problem with Script - ; required? Where? - by markee on 08-01-2007 at 11:45 PM
RE: Problem with Script - ; required? Where? - by Toneo on 08-02-2007 at 08:41 AM
RE: Problem with Script - ; required? Where? - by LifelesS on 08-02-2007 at 12:00 PM
RE: Problem with Script - ; required? Where? - by matty on 08-02-2007 at 12:40 PM
RE: RE: Problem with Script - ; required? Where? - by LifelesS on 08-02-2007 at 01:15 PM
RE: Problem with Script - ; required? Where? - by LifelesS on 08-02-2007 at 12:43 PM
RE: Problem with Script - ; required? Where? - by Ezra on 08-02-2007 at 01:03 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