Skip to content

Instantly share code, notes, and snippets.

@seebees
Created November 25, 2011 18:09
Show Gist options
  • Save seebees/1394102 to your computer and use it in GitHub Desktop.
Save seebees/1394102 to your computer and use it in GitHub Desktop.
//Problem: area is not defined
var mapmove = io
.of('/mapmove')
.on('connection', function (socket) {
var area = 0;
socket.on('areachange', function(data) {
area = removeSocketFromArea.call(this, data);
});
});
function removeSocketFromArea(area) {
//remove socket from old area
if (area != 0) {
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment