Jump to content
McKay Development

Recommended Posts

Posted

Hello,

When I send offer i get error: "callback is not a function" in steam-tradeoffer-manager/lib/helpers.js in 45 line.

That is my code:

function sendOffer(customer, bot, customerItems, botItems) {

  var botInventory = manager.getUserInventoryContents(customer, 753, 6, true, function(err, inventory, currencies) {
    return inventory;
  });
  var customerInventory = manager.getUserInventoryContents(bot, 753, 6, true, function(err, inventory, currencies) {
    return inventory;
  });

  var Exchange = manager.createOffer(customer);
  var message = "Thank You for trading with me. Here's your cards. This offer expires in 10 minutes.";

  var ExchangeBot = GetExchangeItems(botInventory, botItems);
  var ExchangeUser = GetExchangeItems(customerInventory, customerItems);

  Exchange.addTheirItems(ExchangeUser);
  Exchange.addMyItems(ExchangeBot);

  Exchange.send(message, 'Dh58A2w', function(err, status) {
    console.log('Exchange ID:' + Exchange.id + ' send: ', status);
  });
}

And I have second question. How to send offers to friends without token?

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