I am struggling to identify my issue!
/var/www/html/bot# nodejs driver
/var/www/html/bot/driver.js:2239
});
^
SyntaxError: Unexpected token }
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
When I check line 2239, there seems to be no issue! I encountered a similar problem with line 1631 before, and even after fixing it, the issue now appears on line 2239
Can someone please provide assistance?
Edit:
Last few lines
function time() {
return parseInt(new Date().getTime()/1000)
}
function generate(count) {
return crypto.randomBytes(count).toString('hex');
}
function array_limit(value){
if(chat_history.length==25){
chat_history.shift();
chat_history.shift();
}
chat_history.push(value);
}
function jp_limit(value){
if(jpWinners.length==10){
jpWinners.shift();
}
jpWinners.push(value);
}
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
I am unable to spot the issue in my last few lines...