socket.io program, run in this context error?

I am very new to programming and am having trouble writing this basic program. I'm trying to write a game that employs some basic multiple choices, and stores the values, then broadcasts the values in a code to all users.

Here is what I have so far:

var io = require("socket.io").listen(8099);

var A = 0;
var B = 0;
var C = 0;
var code = [A, B, C]

io.sockets.on("connection", function (socket) {
    socket.send(mastercode);
            }
    socket.on("message", function (data) {

        var new_data = data.split(',');
        if (new_data[0] == A) {
            A = A++;
            socket.broadcast.emit("message", code);
            }
            else if (new_data[0] == B){
            B = B++;
            socket.broadcast.emit("message", code);
            }
            else if (new _data[0] == C){
            C = C++;
            socket.broadcast.emit("message", code);
            }

    });

and here is the error I recieve when I run it:

socket.on("message", function (data) [
^^^^^^
module.js:437
   var compiledWrapper = runInThisContext(wrapper, filename, true);
                         ^

SyntaxError: Unexpected identifier
   at Module._compile (module.js:437:25)
   at Object.Module._extensions..js(module.js:467:10)
   at Module.load(module.js:356:32)
   etc. there are a few more of these SyntaxErrors that all seem to say the same thing. 

Does anyone know what's causing these problems? I've been following lots of guides and keep running into this error. I've based my code of others sourcecode(where they permit it, this man specifically, http://jptarqu.blogspot.com.au/2012/04/how-to-create-online-multiplayer-html5.html) to keep the errors as minimized as possible. Please help?

Thanks for any and all info.