quote:
Originally posted by markee
You have to return an empty string with commands, so it will be...
var test1 = 'Hello World!';
code:
function OnGetScriptCommands()
{
var ScriptCommands = "<ScriptCommands>";
ScriptCommands += "<Command>";
ScriptCommands += "<Name>test</Name>";
ScriptCommands += "<Description>testing</Description>";
ScriptCommands += "</Command>";
ScriptCommands += "</ScriptCommands>";
return ScriptCommands;
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
switch (Message) {
case "/test":
foo();
return "";
break;
}
}
function foo() {
ChatWnd.SendMessage(test1);
}
Code after a return doesn't execute does it? That means that the break is not needed