-
Posts
3 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Rzn's Achievements
-
I'll try that thanks !
-
Thanks for the answer ! It's working but for some reason it only works once per account, when i run my app.js again with the same account, accountData doesn't show up. Maybe i'm not logging off properly before exiting ?
-
Rzn started following globaloffensive : accountData is undefined
-
Hello, I am new to node and so my problem is that I cannot print accountData to console, it says it's undefined. I read in the docs that the object exists when the "accountData" event is emitted, so here's what I did : const SteamUser = require('steam-user'); const GlobalOffensive = require('globaloffensive'); let user = new SteamUser(); let csgo = new GlobalOffensive(user); const logOnOptions = { accountName: <Hidden>, // Consider these as valid credentials password: <Hidden> }; user.logOn(logOnOptions); user.on('loggedOn', () => { console.log('Connected to Steam!'); user.gamesPlayed([730]); csgo.on('connectedToGC', () => { console.log('Connected to GC!'); csgo.on('accountData', () => { console.log(csgo.accountData); user.logOff(); process.exit(); }); }); }); And this is what I get : What am I doing wrong ? Thanks in advance !