Sam Posted June 20, 2022 Report Posted June 20, 2022 Hello. There's a steam bug or something else with trading Rust items. Sometimes when I accept an offer, the items are not showing up into my inventory. I have to get another offer with at least one item and when I accept it, the item from the previous trade is then shown into my inventory. The problem is I don't know what to do when some user Deposit/Withdraw and I cannot get the new assetids of the items due to that bug, because it just shows an empty object. Part of my code: if(TradeOfferManager.ETradeOfferState[offer.state] == "Accepted") { offer.getExchangeDetails((err, status, tradeInitTime, receivedItems, sentItems) => { if (err) throw err; console.log(receivedItems); //Here sometimes it's empty. I'm checking the offer in tradeoffers history and I always receive items, so it should display that. }); } Quote
Dr. McKay Posted June 20, 2022 Report Posted June 20, 2022 Plug the trade_id (not the trade offer ID) from the offer in question into the GetTradeStatus API and see if it returns any info. If not, then it's a problem on Steam's end and there's nothing we can do about it, sadly. Quote
Sam Posted June 21, 2022 Author Report Posted June 21, 2022 Hello and thanks for your help. I checked the offer by trade_id. It's not empty. {"response":{"trades":[{"tradeid":"4120244556543804085","steamid_other":"76561198235183636","time_init":1654976889,"status":3,"assets_given":[{"appid":252490,"contextid":"2","assetid":"3729557288863109072","amount":"1","classid":"3631599957","instanceid":"0","new_assetid":"3740816287932624686","new_contextid":"2"},{"appid":252490,"contextid":"2","assetid":"3729557288863109073","amount":"1","classid":"4481862621","instanceid":"0","new_assetid":"3740816287932624689","new_contextid":"2"}]}]}} It's weird that this thing is happening on player to player trade, without any bots and codes. It only happens for rust, as far as i noticed myself. I was wondering to get some "debug" items and make a tradeoffer whenever "missing items" error occurs while trying to send an offer with the requested items. Because they are in the inventory, but they are hidden till a new item pops up. Quote
Dr. McKay Posted June 21, 2022 Report Posted June 21, 2022 Looks like it's returning assets_given, but not assets_received, so that would be why receivedItems is empty in TradeOfferManager. That's the data that Steam is reporting. Quote
Sam Posted June 21, 2022 Author Report Posted June 21, 2022 I'm using 2 bots. One as a storage and one as a trading bot. When somebody requests a withdraw, trading bot gets the items by the store bot, when offer is Accepted, the trading bot sends an offer to the user with the items. The problem is offer is accepted but the trading bot is empty. I have to debug it as i said above. Im storing the assetids into database table with states of the offer and unique id, the problem is that row "new_assets" was empty. I don't know what to do at that situation. May i somehow get the items by that bugged offer after a new offer is accepted and the items show up? Like getItemsByOffer(offerid) or some other parameter, i don't know. Quote
Dr. McKay Posted June 21, 2022 Report Posted June 21, 2022 Check the same trade ID using the other bot's API key and see if it properly reports assets_received. Quote
Sam Posted June 21, 2022 Author Report Posted June 21, 2022 {"response":{"trades":[{"tradeid":"4120244556543802635","steamid_other":"76561198245675394","time_init":1654976854,"status":3,"assets_given":[{"appid":252490,"contextid":"2","assetid":"3740816287932622872","amount":"1","classid":"3631599957","instanceid":"0","new_assetid":"3729557288863109072","new_contextid":"2"},{"appid":252490,"contextid":"2","assetid":"3740816287932622877","amount":"1","classid":"4481862621","instanceid":"0","new_assetid":"3729557288863109073","new_contextid":"2"}]}]}} Yep The items are in the inventory they are just hidden for some reason. I once did console.log(receivedItems) and i got empty array []. After sending another offer, the items were shown. Quote
Dr. McKay Posted June 21, 2022 Report Posted June 21, 2022 I bet that for some reason, immediately after the trade finishes it's not returning the items but after some time they show up. I'd recommend that you set up retries for getExchangeDetails if it comes back empty. Quote
Sam Posted June 21, 2022 Author Report Posted June 21, 2022 I've done that. They will never show up unless another offer isnt accepted. One that i receive items from. I can debug that with like if(state == "missingItems") debug[uniqueid] = 1; And then when somebody trades, i get the items by the previous offer. I just dont know how to get the items by already finished offer in the code. Do i need to store tradeid in the table as well or.. im not quite sure. Quote
Dr. McKay Posted June 21, 2022 Report Posted June 21, 2022 You could just keep the offer object in memory somewhere and call getExchangeDetails on it again later. Or look it up by trade offer ID. TradeOfferManager doesn't have any way to request the trade status API without having a TradeOffer object first. Quote
Sam Posted June 21, 2022 Author Report Posted June 21, 2022 Well i dont know, i will try something and see what happens. It's really sad that steam does this thing. 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.