DoctorMcKay / node-globaloffensive

A Node.js module to connect to and interact with the CS2 game coordinator. Mostly used to get item data.
https://www.npmjs.com/package/globaloffensive
MIT License
262 stars 61 forks source link

Cannot read property 'on' of undefined #4

Closed hcongvan closed 7 years ago

hcongvan commented 7 years ago

i have problem with event 'inspectItemInfo'

csgo.on('inspectItemInfo',function(item){ ^

TypeError: Cannot read property 'on' of undefined at Object. (D:\SteamGuard\Bot\test.js:149:5) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:393:7) at startup (bootstrap_node.js:150:9) at bootstrap_node.js:508:3

DoctorMcKay commented 7 years ago

csgo is undefined. Define it.

hcongvan commented 7 years ago

Thanks you, DoctorMcKay i place it wrong position.