jbl Posted July 27 Report Share Posted July 27 Hi, First of all thanks for creating node-globaloffensive! I've been trying to get connected, but I'm currently failing. I have the following setup code. const SteamUser = require('steam-user'); const SteamTotp = require('steam-totp'); const GlobalOffensive = require('globaloffensive'); const steamCredentials = { accountName: "omitted", password: "omitted", twoFactorCode: SteamTotp.generateAuthCode("omitted"), }; const steamUser = new SteamUser(); const csgo = new GlobalOffensive(steamUser); steamUser.logOn(steamCredentials); steamUser.on("loggedOn", () => { console.log("Logged into Steam as", steamUser.steamID.getSteam3RenderedID()); steamUser.setPersona(SteamUser.EPersonaState.Online); steamUser.gamesPlayed([730]); // Start CSGO }); steamUser.on("error", console.error); csgo.on("debug", console.log); csgo.on("connectedToGC", () => { console.log("Connected to GC"); }); The issue is that "connectedToGC" is never fired. The output I get when running the above code is. It's stuck in the sendHello function https://github.com/DoctorMcKay/node-globaloffensive/blob/master/index.js#L108-L124... Logged into Steam as [U:1:OMITTED] Sending GC message ClientHello Sending hello, setting timer for next attempt to 2000 ms Sending GC message ClientHello Sending hello, setting timer for next attempt to 4000 ms Sending GC message ClientHello Sending hello, setting timer for next attempt to 8000 ms Sending GC message ClientHello Sending hello, setting timer for next attempt to 16000 ms Sending GC message ClientHello Sending hello, setting timer for next attempt to 32000 ms ... I've read through this thread 👇 and tried to use the code linked in that thread that is claimed to fire "connectedToGC" https://gist.github.com/henrykvdb/401a6c3f543afdd89c4886ca9ead0d47 Must be something that I'm missing 🤔 Thank you in advance. Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted July 27 Report Share Posted July 27 That code looks fine at a glance. Does the account you're using have a license for CS:GO? You need to add it to your library before you can launch it. If it's not showing as in-game on its profile page, then that would mean that you don't have a license. You can use steam-user's requestFreeLicense method to add it to your library. Quote Link to comment Share on other sites More sharing options...
jbl Posted July 27 Author Report Share Posted July 27 You were right! No it works. Thank you so much! Dr. McKay 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.