SyntaxError: Unexpected token }


#1

I’ve got problem with this error. It’s says, that there’s a unexpected character on line 73, but I don’t have line in my project. My code ends on the 71-st line and one more empty line (72). So where’s the problem?


C:\Users\User\Documents\SteamBot\bot.js:73
});
^

SyntaxError: Unexpected token )
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions…js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3


64 client.on(“tradeRequest”, function(steamID, respond){
65 console.log("Incoming trade request from " + steamID.getSteam3RenderedID() + “, accepting”);
66 respond(true);
67 })
68
69 client.on(“tradeStarted”, function(steamID) {
70 steamTrade.open(steamID);
71 } )
72


Thanks for your respond.


#2

Are you sure you didn’t miss any bracket before the line suggested in the error message? Maybe you should consider using a linter on this file and see what’s going on in there.


#3

What is giving this error? It doesn’t look like at Atom stack trace.


#4

Thanks guys for your help, I have found the part of the code that made this error.


#5

Hello kloki182: Can you share what changes did you do to fix this error?


#6

hey, can you please share the fix?


#7

That’s going to depend on your code.