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

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

  • 6 months later...
On 4/20/2022 at 8:57 PM, 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.

the map only stocks ids 
 

[
    {
        "appid": 753,
        "contextid": 6,
        "assetid": [
            [
                "22434481908",
                "22434481910",
                "22434481915",
                "22434481907",
                "22434481917"
            ],
            [
                "22434481909",
                "22434481911",
                "22434481918",
                "22434481913",
                "22434481919"
            ],
            [
                "22434481914",
                "22434481912",
                "22434481921",
                "22434481916",
                "22434481920"
            ]
        ]
    }
]

 

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...
×
×
  • Create New...