Jump to content
McKay Development

Recommended Posts

Posted

So my end goal is to get the item market_names from a trade, get the price of each item using steamlytics, add it together, then compare itemsToGive and itemsToReceive and have the bot accept the trade based on whether its + or -. First is what im trying to do possible using tradeoffer-manager and steamlytics?

 

My problem is I cant figure out a way to get just the market names of each item. Im able to get 1 if im only sending one item. It seems like itemsToGive and itemsToReceive return an array that has each item as an object with the info about the items as properties of the object.

What do I need to do to get the specific "market_name" property out of the array?

 

Ive tried various for and foreach loops but nothing im doing is giving me the output Im wanting.

 

 

Any guidance or a way of doing this thats easier than im making?

Posted (edited)

Did you set a language in the constructor? If you don't, there will be no descriptions (including market_name) present. If you do, then market_name will be a property of each object in the arrays.

Yes I did, my problem is accessing multiple instances of it. 1 single item works fine any more than that and it just spits out the first one it looks at.

Edited by ders

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