Jump to content
McKay Development

Recommended Posts

Posted (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 by cookie
Posted

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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...