Jump to content
McKay Development

Recommended Posts

Posted

Hey,

we use the tradeoffer manager to let the user deposit on our system.
For that we only let them deposit skins and don't take skins from our bot.

In this case we check the offer and after accept it we use the getReceivedItems function to recheck the offer + read the item ids.
in 70% of the cases all works fine.
But on the 30% of cases even if we try it up to 180 times over 12 hours the receivedItems is still 0

But the offer is definitly accepted and the items which was in this trade are on our account.

Since we checked it 180 times over 12 hours i don't think there is a error bec steam is down or something.

Maybe you've got an idea guys?

Posted (edited)

Partially answered your question in GitHub issue (DoctorMcKay/node-steam-tradeoffer-manager#146). `getReceivedItems` method doesn't really fail often. It's mostly likely something with your code that's causing it. What I'd say - there's no received item in these trades at all. If you want to check what items are meant to be sent before accepting the trade - check itemsToGive property of the offer, if the array length is 0 - you're safe to accept the offer, as it shouldn't take any items from your inventory.

 

@EDIT

Check if itemsToGive.length is 0, and itemsToReceive.length is greater than 0. If both tests pass, then accept the offer.

 

Make sure you check both, as both itemsToGive and itemsToReceive could be empty when the Steam econ server is acting up, even though you might be giving items in that offer.

Edited by Mole

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...