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

Invalid command?
Author: Message:
hidendra
New Member
*


Posts: 2
Joined: May 2007
O.P. Invalid command?
Hi,
I am making my own Bot, I have most of it done, and since I've started, I've gotten the 'unknown command' with "/" commands, but they work fine.
How do you add it to the command list for Plus? When I try, it won't Re-Run when I save it.

Thanks in advance:)
05-13-2007 09:52 PM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
29 / Male / Flag
Joined: Nov 2006
Status: Away
RE: Invalid command?
try posting your code here and we'll see + fix errors.


the code for adding your commands (my way :tongue:):
code:
function OnGetScriptCommands(){
var SC = "<ScriptCommands>";
SC += "<Command>";
SC += "<Name>Your_Command</Name>";
SC += "<Description>Your description.</Description>";
// SC += "<Parameters>Optional. uncomment this if you want</Parameters>";
SC += "</Command>";

SC += "</ScriptCommands>";
return SC;
}

// to parse.
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
if(Message.toLowerCase() == "/your_command"){
/* if(Message.length <= 13){ // for getting the parameter
return "/me";
}
*/

/* do something here */

return ""
}
}


This post was edited on 05-13-2007 at 10:51 PM by roflmao456.
[quote]
Ultimatess6
: What a noob mod
05-13-2007 10:47 PM
Profile PM Web Find Quote Report
hidendra
New Member
*


Posts: 2
Joined: May 2007
O.P. RE: Invalid command?
XD I commented out my old WndSendMessage, and replaced with yours, tested with /check, and worked fine -,=;; I had some huge ass thing for my way XDD. Thought already had OnGetScriptCommands, so no need to add that =D
So yea, gunna convert my commands. Thanks :P
05-13-2007 10:58 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: Invalid command?
roflmao456, I understand that if you have no problems with the way you're parsing a command, well, fine then. But keep in mind that is NOT the way it should be. CookieRevised made an excellent post about this including example code which respects the original rules of Plus! commands, check it out: CookieRevised's reply to [Release] Exit WLM.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
05-14-2007 03:35 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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