Jump to content
McKay Development

Recommended Posts

Installed packages.
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]

buvf6Rv-_8U.jpg

bot: new SteamUser(),
community: new SteamCommunity(),
offers: new TradeOfferManager(),
function trade(botid, senderid, trd) {
    bots[botid].offers.getInventoryContents(753, 6, true, function(err, inventory) {
        if (err) {
            logger.error(err);
            return;
        }
        if (inventory.length == 0) {
            logger.warn("Steam inventory is empty");
            return;
        }
        logger.info("Found " + inventory.length + " Steam items");
        var trode = bots[botid].offers.createOffer(new TradeOfferManager.SteamID('' + senderid + ''), '' + trd + '');
        trode.addMyItems(inventory);
        trode.setMessage("items");
        trode.send(function(err, status) {
            if (err) {
                logger.error(err);
                return;
            }
            if (status == 'pending') {
                logger.info('Offer sent, but requires confirmation');
                bots[botid].community.acceptConfirmationForObject(bots[botid].identity_secret, trode.id, function(err) {
                    if (err) {
                        logger.error(err);
                    }
                    else {
                        logger.info('Offer confirmed');
                    }
                });
            }
        });
    });
}

When I do not specify a token, I get an error. Sorry for my bad english and ty for helping.

Edited by ALITE
Link to comment
Share on other sites

You can't send or accept this trade offer because either you can't trade with the other user, or one of the parties in this trade can't send/receive one of the items in the trade. Possible causes: a ) You aren't friends with the other user and you didn't provide a trade token. b ) The trade token was wrong. c) You are trying to send or receive an item for a game in which you or the other user can't trade (e.g. due to a VAC ban). d) You are trying to send an item and the other user's inventory is full for that game.

Edited by JVz
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...