Santa Posted October 14, 2016 Report Posted October 14, 2016 Hi evereone! I'm stuck on this, please, help me out. manager.on('newOffer', function(offer) { ... acceptOffer(offer, userid, function(err, result) { if(err){ //Steam return error } else { //All fine } }); ... }); If Steam return errors like #11 or #16 etc, that means it's unable to accept the offer at the moment, but it's alright after several seconds.This creates a lot of junk records in my database, since i have to write into it to keep track of the errors and re-accept trades..Can I delete that offer from polldata to call 'newOffer' again or what else can I use to recall newOffer for not acceptable trades? Quote
Dr. McKay Posted October 15, 2016 Report Posted October 15, 2016 It's not really recommended to manipulate poll data. TradeOfferManager's job is to emit newOffer once per incoming offer. Errors can be frustrating but it's your responsibility to make sure that they're dealt with properly. You could use offerList to check for offers that should have already been accepted (probably want to keep a list of offers you've attempted to accept and the timestamp so you don't try to accept an offer too frequently). Santa 1 Quote
Santa Posted October 15, 2016 Author Report Posted October 15, 2016 It's not really recommended to manipulate poll data. TradeOfferManager's job is to emit newOffer once per incoming offer. Errors can be frustrating but it's your responsibility to make sure that they're dealt with properly. You could use offerList to check for offers that should have already been accepted (probably want to keep a list of offers you've attempted to accept and the timestamp so you don't try to accept an offer too frequently).Thanks for an answer!Also I have a question - offers don't update by polls sometimes.When new offer exists but event newOffer hasn't been running - what should I do in this case?Is it OK and I just need to check new offers by another method or there's my mistake?Sorry for my English. Quote
Dr. McKay Posted October 15, 2016 Report Posted October 15, 2016 You're saying that sometimes newOffer isn't emitted for an offer? Quote
Santa Posted October 15, 2016 Author Report Posted October 15, 2016 You're saying that sometimes newOffer isn't emitted for an offer?Yes 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.