Hi, I have a question.
I have a chat and I send a message from client to server and server send this message to all client.
Actually I sent to server 2 variables (whoSend, msgChat) that they are my nickname and my message.
Now I want to send to server only 1 variable (msgChat for my message). It's possible take my nickname when i call this function?
Client.prototype.msgCHATall = function(whoSend, msgChat) {
for (i=0; i<application.clients.length; i++) {
application.clients[i].call("msgCHATallRISP", null, whoSend, msgChat);
}
};I've tryed this solution but doesn't works:
Client.prototype.msgCHATall = function(msgChat) {
whoSend = gFrameworkFC.getClientGlobals(oldClient).username;
for (i=0; i<application.clients.length; i++) {
application.clients[i].call("msgCHATallRISP", null, whoSend, msgChat);
}
};
p.s. I use Jorge's base_chat.