Okay, I ran the debugger with this:
quote:
var ChatWnds = new Array();
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
if(Message == "!s"){
ChatWnd.SendMessage("/vc 15");
ChatWnds[ChatWnds.length-1] = ChatWnd;
MsgPlus.AddTimer("Delay1"+ChatWnds.length-1, 15300);
else if(Message == "!q"){
MsgPlus.CancelTimer("Delay1"+ChatWnds.length-1);
}
}
function OnEvent_Timer(TimerId){
switch(TimerId.substr(0,6)){
case "Delay1":
ChatWnds[TimerId.substr(6)].SendMessage("/vc 15");
MsgPlus.AddTimer("Delay2"+[TimerId.substr(6)], 15200);
break;
case "Delay2":
ChatWnds[TimerId.substr(6)].SendMessage("/vc 15");
And the debugger displayed:
quote:
Script has been stopped
Error: Syntax error.
Line: 7. Code: -2146827286.
Line 7 is
else if(Message == "!q"){ in the scripting window.
Next, I removed
else from that line, then the debugger displayed:
quote:
Error: Expected '}'.
Line: 58. Code: -2146827279.
The actual script is longer, so this line is past the case "Delay 10" call. So I placed an "}" there and it says the script is loaded and ready.
But now, it won't send anything past the first delay, regardless of whether "!q" is sent or not.