EnelGy Posted November 29, 2020 Report Posted November 29, 2020 (edited) Got error called "Error: Invalid input SteamID [object Object]" and don't know what to do... My code: manager.getUserInventoryContents(offer.partner.getSteamID64(), 440, 2, true, function (err, myInv){ if (err) { console.log(err); } else { // I need to send X ref var volume = entryCost; // amount = number in args[2] // Filter out all the ref var ref = myInv.filter(function (item) { return item.market_hash_name.match('Mann Co. Supply Crate Key') }); // Let the user know we don't have enough ref if (ref.length < volume) { unmuteChannel(); console.log('Not enough Keys'); message.reply(notEnough); console.log('------------------------'); return true; // Give up } // Start a new trade offer // Add what we should to the current trade console.log('Adding '+volume+' Keys'); offer.addTheirItems(ref.slice(0, volume)) // Send the offer offer.send(function (err, status){ if (err) { console.log(err); } else { console.log('Trade offer #'+ offer.id+ ' sent successfully'); // Register the offer id, save it to JSON file client.tradeLinks ['lastguy'] = { name: message.author.tag, tradelink: _message, lastoffer: offer.id } fs.writeFile ('tradeLinks.json', JSON.stringify(client.tradeLinks, null, 4), err => { if (err) throw err; }) message.reply(readyOffer + offer.id + '>'); // Cancels after 2 minutes offer.data('cancelTime', 120000); // Starts the function myTimer() every 3 seconds to know the status thats on start var myVar = setInterval(myTimer, 3000); function myTimer() { if (ifvartruefalse === "canceled") { clearInterval(myVar); ifvartruefalse = ""; message.channel.send(cancelOffer); unmuteChannel(); console.log('------------------------'); return; } else if (ifvartruefalse === "false"){ clearInterval(myVar); ifvartruefalse = ""; message.reply(deletingCF); unmuteChannel(); console.log('------------------------'); return; } else if (ifvartruefalse === "invalid"){ clearInterval(myVar); ifvartruefalse = ""; message.reply(invalidItems); unmuteChannel(); console.log('------------------------'); return; } else if (ifvartruefalse === "true"){ clearInterval(myVar); ifvartruefalse = ""; message.channel.send(joined); unmuteChannel(); var theTimeout; } return; } } }); } }); Edited November 29, 2020 by EnelGy Quote
Dr. McKay Posted November 30, 2020 Report Posted November 30, 2020 Which line is that occurring on? Quote
EnelGy Posted November 30, 2020 Author Report Posted November 30, 2020 I have already solved, I wrongly defined offer 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.