Jace Posted August 8, 2018 Report Share Posted August 8, 2018 I have this line for the intention of selling my card sets for his gems. manager.getUserInventoryContents(steamID.getSteamID64(), CONFIG.GEMSFROMINVENTORY, 6, true, (ERR, INV, CURR) => { if (ERR) { console.log(ERR); client.chatMessage(steamID, "Please try later"); } else { if (!ERR) { for (let i = 0; i < INV.length; i++) { if (theirGems < CONFIG.ACCEPTEDGEMS.indexOf(INV.market_hash_name) >= 0) { theirGems.push(INV); } } and at the end part I have this theirGems.amount = [n]; t.addTheirItems(theirGems); instead it gets the other users whole inventory. Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted August 10, 2018 Report Share Posted August 10, 2018 You need to filter the inventory to get just the items you want. Array.prototype.filter will probably interest you. Quote Link to comment Share on other sites More sharing options...
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.