aatmjeets Posted June 24, 2020 Report Posted June 24, 2020 I keep getting this error code 26, i am asking for a random item from an account. client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); community.startConfirmationChecker(10000, config.bot1.idSecret); getRandomItem(); }); function getRandomItem() { const partner = config.bot1.trustedParty; const appid = 730; const contextid = 2; const offer = manager.createOffer(partner); manager.loadUserInventory(partner, appid, contextid, true, (err, inventory) => { if (err) { console.log(err); } else { const item = inventory[Math.floor(Math.random() * inventory.length - 1)]; console.log(item); offer.addMyItem(item); offer.setMessage(`can you give me this ${item.name}!`); offer.send((err, status) => { if (err) { console.log(err); } else { console.log(`Sent offer. Status: ${status}.`); } }); } }); } kindly help. Quote
aatmjeets Posted June 24, 2020 Author Report Posted June 24, 2020 Extremely sorry for wasting the time, i figured it out. It was offer.addMyItem, while it should be offer.addTheirItem. Dr. McKay 1 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.