sNIP Posted December 13, 2019 Report Posted December 13, 2019 (edited) When I send a trade, it keeps telling me that the offer status is changed to 2 (Active), this happens every ~4-~7 seconds after I send the offer. Code related to the trade offer manager EDIT: The code below is wrapped inside an async Start() function, so I can use async. var pollData = await offerService.getPollData(); const manager = new TradeOfferManager({ steam: client, community: community, language: "en", cancelOfferCount: 30, pollData: pollData }); manager.on("sentOfferChanged", (offer, oldState) => { //<this emits every ~4-~7 seconds console.log(`Sent offer changed:` + offer.state); senderService.onSentOfferChanged(thisId, offer.partner.getSteamID64(), offer); }); manager.on("pollData", data => { offerService.savePollData(thisId, data); }); Edited December 13, 2019 by sNIP Quote
sNIP Posted December 13, 2019 Author Report Posted December 13, 2019 (edited) EDIT2: the emmiting stops when the trade offer is accepted and finalized(havent tested with others statuses) EDIT2.1: some offers are fine, some are causing "sentOfferChanged" to emit too much Edited December 13, 2019 by sNIP Quote
Dr. McKay Posted December 14, 2019 Report Posted December 14, 2019 What is the oldState when it emits when you believe it shouldn't? Quote
sNIP Posted December 19, 2019 Author Report Posted December 19, 2019 On 12/14/2019 at 11:09 AM, Dr. McKay said: What is the oldState when it emits when you believe it shouldn't? I will check it, but I believe its the same, because if I keep the app running, it can emit 1000 times before I close it or the trade offer changes it states Quote
sNIP Posted December 20, 2019 Author Report Posted December 20, 2019 The old state is 12, which is strange because the TradeOfferEnum max number is 12. Is that a debug number? Quote
Dr. McKay Posted December 21, 2019 Report Posted December 21, 2019 There's no reason why it should ever be 12, that isn't used internally or anything. Maybe Steam is just really really fussy for your account or something? Maybe 12 is a value used internally by Valve for something and something's buggy with your offer(s). Could you set up a script to monitor the API directly and alert if it notices a value of 12? Quote
sNIP Posted December 21, 2019 Author Report Posted December 21, 2019 16 hours ago, Dr. McKay said: There's no reason why it should ever be 12, that isn't used internally or anything. Maybe Steam is just really really fussy for your account or something? Maybe 12 is a value used internally by Valve for something and something's buggy with your offer(s). Could you set up a script to monitor the API directly and alert if it notices a value of 12? Iam using this, it works fine, when I have time, I will look it up, probably after my finals. if(oldState == 12){ return; } Dr. McKay 1 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.