Closed ghost closed 8 years ago
Can you show error log in console? Make screen please.
Did you try to write Item in console and check it? I mean are you sure that it's correct?
I think it's because i didn't set accessToken. In other bot (it is not working now because of steam update) i see the code:
offers.makeOffer ({
partnerSteamId: row[i].userid,
itemsFromMe: item,
accessToken: row[i].token,
itemsFromThem: [],
message: 'Your winning on site '+sitename+' in game #'+gamenum
}, function(err, response){
if (err) {
return;
}
console.log('Trade offer for queue '+gamenum+' sent!');
});
but i cannot imagine how the code should look in your bot.
Edit: Yes! I found a solution. The code: manager.loadInventory("730", "2", true, function(err,inventory, currencies){ if (err) console.log(err); var Item; inventory.forEach(function(item,i,arr){ if (item.market_hash_name == "Chroma 2 Case") Item = item; }); var offer = manager.createOffer("xxxxxxxx"); //Put here stemdId offer.addMyItem(Item); offer.send("Hello!", "token", function(err,status){ if (err) console.log(err); else console.log(status); }); });
Hey, i get this error when i try to send trade offer. My code: manager.loadInventory("730", "2", true, function(err,inventory, currencies){ if (err) console.log(err); var Item; inventory.forEach(function(item,i,arr){ if (item.market_hash_name == "Chroma 2 Case") Item = item; }); var offer = manager.createOffer("xxxxxxxx"); //Put here stemdId offer.addMyItem(Item); offer.send("Hello!", function(err,status){ if (err) console.log(err); else console.log(status); }); });