Error in code! - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Error in code! (/showthread.php?tid=71197)
Error in code! by Flaming Rob on 01-30-2007 at 07:14 AM
Why isn't this working?
i = 0;
names = new Array();
names[0] = "";
names[1] = "";
emails = new Array();
emails[0] = "me@hotmail.com";
emails[1] = "me2@hotmail.com";
smile = new Array;
smile[0] = "";
smile[1] = "";
smile[2] = "";
smile[3] = "";
smile[4] = "";
smile[5] = "";
smile[6] = "";
smile[7] = "";
smile[8] = "";
smile[9] = "";
smile[10] = "";
smile[11] = "";
smile[12] = "";
smile[13] = "";
smile[14] = "";
smile[15] = "";
smile[16] = "";
smile[17] = "";
smile[18] = "";
smile[19] = "";
smile[20] = "";
smile[21] = "";
smile[22] = "";
smile[23] = "";
smile[24] = "";
smile[25] = "";
smile[26] = "";
smile[27] = "";
function OnEvent_Initialize(MessengerStart)
{
MsgPlus.AddTimer(6000"Update");
}
function OnEvent_Uninitialize(MessengerExit)
{
}
function onEvent_Timer(timerID)
{
if(timerID == "Update")
{
var i = Math.floor(Math.random()*smile.length);
for(var a = 0; a < emails.length; a+)
{
if(Messenger.MyEmail == emails[a])
{
Messenger.MyPersonalMessage = smile[i] + " " + names[a] + smile[i];
MsgPlus.AddTimer("Update", 6000);
}
}
}
}
RE: Error in code! by ddunk on 01-30-2007 at 07:17 AM
quote: Originally posted by Flaming Rob
MsgPlus.AddTimer(6000"Update");
Missing a comma.
Anything else in the debugger?
RE: Error in code! by Jimbo on 01-30-2007 at 07:18 AM
Try this:
code: i = 0;
names = new Array();
names[0] = "HeHe--Random smilies(changes automatically every 6 seconds)";
names[1] = "HeHe--Random smilies(changes automatically every 6 seconds)";
emails = new Array();
emails[0] = "me@hotmail.com";
emails[1] = "me2@hotmail.com";
smile = new Array();
smile[0] = "";
smile[1] = "";
smile[2] = "";
smile[3] = "";
smile[4] = "";
smile[5] = "";
smile[6] = "";
smile[7] = "";
smile[8] = "";
smile[9] = "";
smile[10] = "";
smile[11] = "";
smile[12] = "";
smile[13] = "";
smile[14] = "";
smile[15] = "";
smile[16] = "";
smile[17] = "";
smile[18] = "";
smile[19] = "";
smile[20] = "";
smile[21] = "";
smile[22] = "";
smile[23] = "";
smile[24] = "";
smile[25] = "";
smile[26] = "";
smile[27] = "";
function OnEvent_Initialize(MessengerStart)
{
MsgPlus.AddTimer("Update", 6000);
}
function OnEvent_Uninitialize(MessengerExit)
{
}
function onEvent_Timer(timerID)
{
if(timerID == "Update")
{
var i = Math.floor(Math.random()*smile.length);
for(var a = 0; a < emails.length; a++)
{
if(Messenger.MyEmail == emails[a])
{
Messenger.MyPersonalMessage = smile[i] + " " + names[a] + smile[i];
MsgPlus.AddTimer("Update", 6000);
}
}
}
}
RE: Error in code! by Flaming Rob on 01-30-2007 at 07:20 AM
Sorry but that still doesn't work
RE: Error in code! by Jimbo on 01-30-2007 at 07:21 AM
Updated previous post
RE: Error in code! by Flaming Rob on 01-30-2007 at 07:22 AM
Ok
Yes it is working now.
thanks
|