szustka124 Posted May 8, 2017 Report Posted May 8, 2017 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? Quote
Dr. McKay Posted May 8, 2017 Report Posted May 8, 2017 My assumption is that you're using code written for v1 with v2. You can't provide the message and token to send() in v2. There are separate methods for that. Quote
Recommended Posts
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.