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:
Toneo
Junior Member
**

Avatar
Epic.

Posts: 35
Reputation: 2
28 / Male / Flag
Joined: Jul 2007
O.P. RE: Problem with Script - ; required? Where?
Thanks :) Forgot about arrays and floor(). Didn't know whether to use int or var.

EDIT:
It's still not working. The debugger now says "Error: ; expected" on line 16. I don't understand, there doesn't seem to be a place to put ;. And I don't seem to find anything wrong with my script.

The whole function ChatWnd_ReceiveMessage function.
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageType)
{

if (Origin != Messenger.MyName)
{

if (Messenger.MyStatus != 3)
{
ChatWnd.SendMessage("AutoMessage: I'm busy right now.");
}

var wordArray = new Array ('Hello!', 'Hi!', 'Yo', 'Allo', 'Hiya', 'Why, Hello!');
var randomMsg = wordArray[Math.floor(Math.rand() * wordArray.length)];

switch (Message.toUpperCase())
{
case "HI" :
ChatWnd.SendMessage(randomMsg);
break;

case "HI!" :
ChatWnd.SendMessage(randomMsg);
break;

case "LO" :
ChatWnd.SendMessage(randomMsg);
break;

case "\'LO" :
ChatWnd.SendMessage(randomMsg);
break;

case "HIYA" :
ChatWnd.SendMessage(randomMsg);
break;

case "HIYA!" :
ChatWnd.SendMessage(randomMsg);
break;

case "HELLO!" :
ChatWnd.SendMessage(randomMsg);
break;

case "HELLO" :
ChatWnd.SendMessage(randomMsg);
break;

case "YO" :
ChatWnd.SendMessage(randomMsg);
break;

case "YO." :
ChatWnd.SendMessage(randomMsg);
break;

case "YO!" :
ChatWnd.SendMessage(randomMsg);
break;

case "ALLO" :
ChatWnd.SendMessage(randomMsg);
break;

case "ALLO!" :
ChatWnd.SendMessage(randomMsg);
break;
}

}

}


This post was edited on 08-02-2007 at 08:50 AM by Toneo.
[Image: signature-user=291&back=4&clr=12,102,237&size=80.png]
08-02-2007 08:41 AM
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