What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » problem with invalid command

problem with invalid command
Author: Message:
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
29 / Male / Flag
Joined: Nov 2006
Status: Away
RE: problem with invalid command
code:
var appenable = false;

function OnEvent_ChatWndSendMessage(ChatWnd, sMessage){
if(sMessage.substr(0,12)=="/shortopener") {
switch(sMessage.substr(13)){
case "enable":
appenable = true;
break;
case "disable":
appenable = false;
break;
default:
appenable = !appenable;
}
MsgPlus.DisplayToast("appenable: " + appenable, "shortopener");
return "";
}
}

function OnGetScriptCommands(){
var Commands = "<ScriptCommands>";
Commands += "<Command>";
Commands += "<Name>shortopener</Name>";
Commands += "<Description>Shortopener \n Enables the shortopener, must be written before starting to use Shortopener</Description>";
Commands += "<Parameters>&lt;enable or disable&gt;</Parameters>";
Commands += "</Command>";
Commands += "</ScriptCommands>";
return Commands;
}


i would use booleans ;)
and you have to return nothing otherwise it will show that error

This post was edited on 05-06-2008 at 11:50 PM by roflmao456.
[quote]
Ultimatess6
: What a noob mod
05-06-2008 11:46 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
problem with invalid command - by Zeelia on 05-06-2008 at 11:08 PM
RE: problem with invalid command - by roflmao456 on 05-06-2008 at 11:46 PM
RE: problem with invalid command - by CookieRevised on 05-07-2008 at 01:04 AM
RE: problem with invalid command - by Zeelia on 05-07-2008 at 05:13 AM


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