cycpl Posted April 4, 2016 Report Posted April 4, 2016 I'm using a bot for a jackpot site, and when it accepts a trade sometimes the bot will return an error upon accepting a trade, however the trade is accepted anyway, meaning the bot gets the items but they do not go in to the pot. How can I fix this? Quote
Dr. McKay Posted April 4, 2016 Report Posted April 4, 2016 Welcome to Steam. You should use the receivedOfferChanged event to determine whether an offer was accepted. Mole 1 Quote
cycpl Posted April 4, 2016 Author Report Posted April 4, 2016 Ok thanks I have managed to get it working, and so far no errors, ty for the help Quote
xNiceEinz Posted April 5, 2016 Report Posted April 5, 2016 @cycpl how did you solve it. I'm using "receivedOfferChanged" and there are also trades which are accepted and the event don't trigger.So i'm forced to recheck the trade with "getOffer()" which is in my opinion not the best solution to handle it. Hopefully the event receivedOfferChanged could handle this in near Future... Quote
Gilroy Posted April 5, 2016 Report Posted April 5, 2016 yeah i get this issue as well. if you could advise me on the code exactly to rectify the issue that would be great! Quote
cycpl Posted April 5, 2016 Author Report Posted April 5, 2016 @cycpl how did you solve it. I'm using "receivedOfferChanged" and there are also trades which are accepted and the event don't trigger.So i'm forced to recheck the trade with "getOffer()" which is in my opinion not the best solution to handle it. Hopefully the event receivedOfferChanged could handle this in near Future...I'm just using manager.on('receivedOfferChanged', function(offer, oldState) then processing the trade, I am not aware that any trades have been accepted and not triggered this as of yet. I haven't had to process many trades yet though so it may turn out that what you said may become a problem, but as of yet it has worked fine Quote
speedy Posted April 5, 2016 Report Posted April 5, 2016 I have one question to the "accept([autoRetry][, callback])" function for offers.At the moment i use only the "receivedOfferChanged" event to check if the trade is accepted (but this can take some time)In the wiki https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOffer i found this: Wait for the callback, and if err is null, then process the offer, otherwiseWhen the err is null, is it 100% shure that the trade is "accepted" and can not result in "invaliditems" or "canceled" (so i can process the trade much faster...) ? Quote
Dr. McKay Posted April 6, 2016 Report Posted April 6, 2016 It's Steam we're talking about, so pretty much anything is possible. But I don't know if any instances where the accepting succeeds and then it changes later. Quote
speedy Posted April 6, 2016 Report Posted April 6, 2016 (edited) I know steam is magic awesome, but do you self use this practise or does someone else have good experience with that? Can someone recommend this? Edited April 6, 2016 by speedy Quote
Dr. McKay Posted April 6, 2016 Report Posted April 6, 2016 Personally all my offers are sent by my bots, so I don't have an answer for that. Quote
Valzon Posted September 9, 2016 Report Posted September 9, 2016 Hello. I have the same problem with receivedOfferChanged. Sometimes (<2% of trades) event not fired after accepting offer. Is there some way to manually recheck offer by id and fire this event, if status changed? I didn't find method for this functionality, but I think, that this will be great. Something like recheckStatus(offerId). And this method load data from steam and check offer status in pollData and fire the event if status changed.I can check status manually with getOffer, but I worry, what event can be fired after and offer will be finished twice for my functionality. I can manually update status in pollData, but this will be not clean code.I want to find the best solution for fixing this bug. Help me please. Thanks. P.S: sorry for my bad english Quote
Dr. McKay Posted September 10, 2016 Report Posted September 10, 2016 It's basically your responsibility to manually recheck and handle any double-handles that might arise. 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.