cookie Posted March 22, 2016 Report Posted March 22, 2016 (edited) Many of my time is spent trying to optimizing the bot to work with this awful service steam provides, Error codes like 16 and Error: ETIMEDOUT are some examples, however it is unknown if the offer is sent or not. Any experience anybody would like to share? Possible solutions? Also, when there's an error and the trade offer is sent means trade.id is true if it's false then surely the offer isn't sent? please check the code below: trade = offers.createOffer(p); trade.send('', t, function(err, status){ if(err){ console.log(err); if(trade.id){ console.log('Offer sent whilst having an error'); //Do something } else { console.log('Offer isn\'t sent'); } } else { //Do something } } Edited March 22, 2016 by cookie Quote
Dr. McKay Posted March 22, 2016 Report Posted March 22, 2016 If err is defined, the offer will never have an ID. Sometimes an offer can actually go through after send() gets an error, but that's just Steam and there isn't any real way we can track that. What I'm saying is that if err isn't undefined, then Steam told us that the offer failed to be sent. If it actually got sent, it'll appear in the API later but you won't have its ID as Steam didn't give it to us when we sent it. That's where the unknownOfferSent event comes in. 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.