Jump to content
McKay Development

stuck on adding their trade item


Recommended Posts

below is my code when i try to addtheiritem it just freezes and doesnt do anything if i have a console.log() above it it just spams it i have checked to make sure the tradelink is correct and so is the item id i even added a getpartnerinvetory() just incase there was a problem with that, i dont really understand what im doing wrong every yt video ive watched does it like this and even the docs do. the account details are correct it just doesnt seem to add the items ive tried taking out the addtheiritem and sending the trade without anything i get a empty trade error that should mean the trades definitely started right? any help is appreciated

Screenshot 2022-04-20 004859.png

Screenshot 2022-04-20 004636.png

Link to comment
Share on other sites

Posted (edited)
12 hours ago, Dr. McKay said:

addTheirItem does not take a number argument. Re-read the docs.

is it possible to take a list of assetids and add them into addTheirItems or does it have to be from the getpartnerinventory list ?

Edited by newbboy9969
item=>items
Link to comment
Share on other sites

You could manually construct an object, like this:

let assetIds = [1, 2, 3, 4, 5];
offer.addTheirItems(assetIds.map(id => ({appid: 730, contextid: 2, assetid: id})));

Steam needs to know which game you want to access items for, so the appid and contextid are required.

Link to comment
Share on other sites

Posted (edited)
1 hour ago, Dr. McKay said:

You could manually construct an object, like this:

let assetIds = [1, 2, 3, 4, 5];
offer.addTheirItems(assetIds.map(id => ({appid: 730, contextid: 2, assetid: id})));

Steam needs to know which game you want to access items for, so the appid and contextid are required.

is it possible to load more than 1 inventory for ex: load 1 inventory with the appid 730 and one with the app id 720 . do they have to seperatly loaded or can i throw an array in there and have it work?

Edited by newbboy9969
one* be*
Link to comment
Share on other sites

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

×
×
  • Create New...