Board Thread:Support Requests - Getting Technical/@comment-4748628-20140720195504/@comment-24473195-20141009092742

Gamedezyner wrote:

452 wrote: edit: try this: mainRoom.socket.bind('join',$.proxy(mainRoom.onJoin,mainRoom)); It fires your alert, but there are other errors, possibly because "mainRoom" isn't the correct second parameter - or possibly because that function was just never completed. I was able to make it work without errors using this, only replacing the "$.proxy" bit with a reference to the function I was trying to call.

Thanks for the help!

Edit: Now I see that I was slightly confusing with my wording, I wanted to call a different function when someone joins, not the onJoin function. I was trying to edit onJoin because I thought that it was the function that was already firing when someone joined the chat. The binding makes more sense. I was wondering do you happen to know about the inverse, when a user leaves a chat, is there any function that takes care of that?

Also, is it possible to store anything on the chat server temporarily(till chat server exits), e.g. an array or something?