-
Posts
5 -
Joined
-
Last visited
Gulshan Jangid's Achievements
-
Bot tradeoffer contains only 1 item
Gulshan Jangid replied to Gulshan Jangid's topic in node-steam-tradeoffer-manager
I got that sorted! I was using const item, and by replacing const with var it worked! -
Bot tradeoffer contains only 1 item
Gulshan Jangid replied to Gulshan Jangid's topic in node-steam-tradeoffer-manager
And yeah I only add items which are tradeable, is their a problem with offer.addTheirItem(item)? -
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}.`); } }); } }); } });
-
Gulshan Jangid started following offer id undefined when trade is accepted and Bot tradeoffer contains only 1 item
-
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?
-
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?