Jump to content
McKay Development

Gulshan Jangid

Member
  • Posts

    5
  • Joined

  • Last visited

Gulshan Jangid's Achievements

  1. I got that sorted! I was using const item, and by replacing const with var it worked!
  2. And yeah I only add items which are tradeable, is their a problem with offer.addTheirItem(item)?
  3. I use trade link to send offer to a user not in my friend list. I add their items to the offer using the item id, it successfully adds and sends the offer. But when I see the trade offer it contains only 1 item even if I have sent more than 1. Have a look at the code below (here itemsArray contains the id of items), it was working fine when I used steamid to create tradeOffer instead of tradeUrl, but that was limited to my friend list only: const offer = manager.createOffer(tradeUrl); manager.loadInventory(appid, contextid, true, (err, myInv) => { if (err) { console.log(err); } else { manager.loadUserInventory(partnerid, appid, contextid, true, (err, theirInv) => { if (err) { console.log(err); } else { for(i=0; i<itemsArray.length; i++){ const item = theirInv.find((item) => item.assetid ==''+itemsArray[i]); console.log("got item number" + i); offer.addTheirItem(item); } offer.setMessage(`somerandom message`); offer.send((err, status) => { if (err) { console.log(err); } else { console.log(`Sent offer. Status: ${status}.`); } }); } }); } });
  4. My bot sends two offers and waits for them to get accepted and show their offer id using manager.getOffer method, one of them shows the offerid while other shows undefined. Why is it so?
  5. are there any limits to calling the manager.getOffer method, I mean is there any limit to the amount of api calls for that in a minute?
×
×
  • Create New...