Jump to content
McKay Development

Recommended Posts

Posted

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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...