Now i wrote a quick command parsing bit for my script..
only thing is, the switch/case will not pick it up the string..
quote:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
var CMD = Message.split(" ", 1);
Debug.Trace(CMD);
if(MessageKind == 1){
switch(CMD){
case "!date" : ChatWnd.SendMessage("The date is: (!D)"); break;
case "!time" : ChatWnd.SendMessage("The time is: (!T)"); break;
}
}
}
the debug shows that the correct (splitted) string was used.
quote:
Function called: OnEvent_ChatWndReceiveMessage
!date
any ideas/help?