I found out the problem
and ty mattike that helped too
The problem was
code:
if (sMessage.charAt(0) == '!') {
if(sMessage.charAt(1) == '!') return sMessage;
else var parts = sMessage.split(" ");
}
needed to be
code:
if (Message.charAt(0) == '!') {
if(Message.charAt(1) == '!') return Message;
else var parts = Message.split(" ");
}
Thanks for the idea with the debugger it's a life saver for us beginners (and probably the more advanced programmers too).