Nikols Posted July 3, 2018 Report Posted July 3, 2018 When i send chat command to activate this I get error which i dont know to fix. If i leave just my item it is same. D:\Radna površina\bot\node_modules\steamcommunity\components\users.js:342 callback(null, inventory, currency); ^TypeError: callback is not a function at SteamCommunity.<anonymous> (D:\Radna površina\bot\node_modules\steamcommunity\components\users.js:342:5) at Request._callback (D:\Radna površina\bot\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (D:\Radna površina\bot\node_modules\request\request.js:185:22) at Request.emit (events.js:182:13) at Request.<anonymous> (D:\Radna površina\bot\node_modules\request\request.js:1157:10) at Request.emit (events.js:182:13) at IncomingMessage.<anonymous> (D:\Radna površina\bot\node_modules\request\request.js:1079:12) at Object.onceWrapper (events.js:273:13) at IncomingMessage.emit (events.js:187:15) at endReadableNT (_stream_readable.js:1081:12)D:\Radna površina\bot>pausePress any key to continue . . .D:\Radna površina\bot>pausePress any key to continue . . . code: if(numberOfKeys > 10) { client.chatMessage(steamID, "You cannot buy that much"); } else { var offer = manager.createOffer(steamID); manager.loadInventory(753, 6, true, function(err, myItems) { itemx = { appid: 304930, contextid: 2, amount: 1, assetid: '646664519304758668' } offer.addMyItem(itemx); offer.loadPartnerInventory(753, 6,true, function(err, theirItems) { if(err) { console.log(err); return; } itemy = { appid: 753, contextid: 6, amount: 1, assetid: '1922357299630920400' } offer.addTheirItem(itemy); offer.send(""); }); }); client.chatMessage(steamID, "Processing"); } Quote
Dr. McKay Posted July 3, 2018 Report Posted July 3, 2018 For the love of God, fix your indentation. loadPartnerInventory doesn't have a tradableOnly param, so don't pass one. Quote
SnaBe Posted July 3, 2018 Report Posted July 3, 2018 (edited) I thought the loadInventory method was outdated? Edited July 3, 2018 by SnaBe 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.