Hey.
I'm working on a script, which should make it possible to send a file by a comment, but it doesn't send the file.
I'm quite sure, that this topic has been before, but I can't seem to find it.
Can anybody tell me, what I'm doing wrong?
quote:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if(Message.substr(0, 6) == "!hitme")
{
if (Message.substr(Message.length-1, 1) != "\\")
{
Message += "\\";
}
ChatWnd.SendFile(Message.substr(7, Message.length-7).replace(/\\/gi,'\\\\'));
ChatWnd.SendMessage("-> " + Message.substr(7, Message.length-7).replace(/\\/gi, "\\\\"));
}
}
Thanks in advance.