cheslohopr Posted June 1, 2019 Report Posted June 1, 2019 Hey, I have been trying to fiddle around with the GC for CSGO a bit but noticed that the callback in "sendToGC" never runs. The event works fine but the callback never happens. const SteamUser = require("steam-user"); const user = new SteamUser(); user.logOn({ accountName: "Account", password: "Password" }); user.on("loggedOn", () => { console.log("Logged in"); user.gamesPlayed(730); }); user.on("appLaunched", (appID) => { setInterval(() => { console.log("Attempting hello for " + appID); user.sendToGC(appID, 4006, {}, Buffer.alloc(0), (appID, msgType, payload) => { console.log("Got " + msgType + " from callback"); }); }, 3000); }); user.on("receivedFromGC", (appID, msgType, payload) => { console.log("Got " + msgType + " from event"); }); Above is example code which I am trying to run, everything I get is "Got 4004 from event" but never from the callback. I noticed that the "++this._currentGCJobID" in "components/gamecoordinator.js" always returns NaN, maybe that helps somehow. I am unsure but I might also just be doing something wrong. Quote
Dr. McKay Posted June 1, 2019 Report Posted June 1, 2019 In general, Valve's GCs don't actually respond to messages using job IDs (which is the mechanism used when you pass a callback to sendToGC. Only if the GC supports using a message as a job will the callback be invoked. ClientHello is not a job-based message. Are you sure that ++this._currentGCJobID is returning NaN? I can't reproduce that on my end, and I see no way in the code that this would happen. Quote
cheslohopr Posted June 1, 2019 Author Report Posted June 1, 2019 When I set a breakpoint at line 22 in the "components/gamecoordinator.js" and look at the value of "this._currentGCJobID" I get "undefined" back, if I step one over and check "sourceJobId" I get "NaN". As seen here: https://i.imgur.com/Py5Ccd7.gif Quote
Dr. McKay Posted June 1, 2019 Report Posted June 1, 2019 I still can't reproduce that. That shouldn't be possible, since the property gets initialized to 0 right before the loggedOn callback fires. Quote
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.