Felix Posted March 19, 2016 Report Posted March 19, 2016 Hello, sometimes when my sent offer is accepted, I am calling getReceivedItems method and array in "items" argument is empty.This offer is accepted and items are on bot.Why this is happening sometimes?I think that there is only way to fix this is create recalling of this method if array is empty with something like ~5 iterations. Quote
Felix Posted March 19, 2016 Author Report Posted March 19, 2016 Thank you.One more question: when I am doing offer.send method and there is status "sent" I am receiving offer.id so I can create offer link for user.But there is delay like 0-5 seconds for this link after status is "sent".In this delay user is receiving: "An error was encountered while processing your request:".So if he will refresh this page in ~5 seconds everything will be ok.Is there any ways to check this delay or only way to fix this is manual timeout? Quote
cookie Posted March 19, 2016 Report Posted March 19, 2016 Thank you.One more question: when I am doing offer.send method and there is status "sent" I am receiving offer.id so I can create offer link for user.But there is delay like 0-5 seconds for this link after status is "sent".In this delay user is receiving: "An error was encountered while processing your request:".So if he will refresh this page in ~5 seconds everything will be ok.Is there any ways to check this delay or only way to fix this is manual timeout? it's because of steam, you can use: setTimeout(function(){displayOfferUrl();}, 7000); on the client side, replace displayOfferUrl() with your own function(s) that will display the trade url, it will show the url after 7 seconds. Quote
Dr. McKay Posted March 19, 2016 Report Posted March 19, 2016 This is interesting. I've never experienced any kind of delay for offers which don't need confirmation. Are you 100% sure that the offer is "sent" and not pending confirmation (which is being auto-confirmed or something)? Quote
Felix Posted March 19, 2016 Author Report Posted March 19, 2016 This is interesting. I've never experienced any kind of delay for offers which don't need confirmation. Are you 100% sure that the offer is "sent" and not pending confirmation (which is being auto-confirmed or something)?It is on event "sentOfferChanged" where "offer.state" is "Accepted" and only offer.itemsToReceive.Now it is working well but sometimes there is delay. Steam so slow sometimes. Quote
Felix Posted March 21, 2016 Author Report Posted March 21, 2016 (edited) I have another question...Sometimes when sent offer is accepted and it is a withdraw offer (only items to partner), I am receiving deposit (only items from partner) notification.Is it bug of steam again or how to control it more better?This is how I am checking state of offers: // ETradeOfferState.Accepted: if (offer.itemsToGive.length !== 0) { // withdraw } else { // deposit } Edited March 21, 2016 by Felix Quote
Dr. McKay Posted March 21, 2016 Report Posted March 21, 2016 I don't understand what you're saying. Quote
Felix Posted March 21, 2016 Author Report Posted March 21, 2016 I don't understand what you're saying. I have only 2 types of sent offers:1) only items from partner (offer.itemsToReceive only) - deposit type.2) only items to partner (offer.itemsToGive only) - withdraw type.On "sentOfferChanged" event where "offer.state" is "Accepted" I need to understand what type of this offer.I am checking this with the code that I wrote above.But there is problem sometimes, when I am sending offer with withdraw type and this offer is accepted, bot is telling me that this offer is deposit (but there is offer.itemsToGive.length !== 0).Are there any solutions how to check type of offer in this event except global variables? Quote
Dr. McKay Posted March 21, 2016 Report Posted March 21, 2016 Is itemsToGive for sure bigger than 0? Also are you up to date? Quote
Felix Posted March 21, 2016 Author Report Posted March 21, 2016 Is itemsToGive for sure bigger than 0? Also are you up to date? Mhm, I have 1.21.1. Will update now.This offer was sent (with only items from bot) and accepted so logically itemsToGive was bigger than 0.I will create full debug log for this. Quote
Felix Posted March 21, 2016 Author Report Posted March 21, 2016 http://puu.sh/nOMhD/dedabeee45.pngThis is that offer. Quote
Dr. McKay Posted March 21, 2016 Report Posted March 21, 2016 I ask if you're up to date because Steam can sometimes return data that implies that the offer is completely empty (no items on either side). A recent update made the getOffers request fail instead of returning that bad data. Quote
Felix Posted March 25, 2016 Author Report Posted March 25, 2016 I ask if you're up to date because Steam can sometimes return data that implies that the offer is completely empty (no items on either side). A recent update made the getOffers request fail instead of returning that bad data. So there is no way to understand what type of this offer by checking it only in offer object?Will check it in DB then. itemsToGive: [], itemsToReceive: [], Quote
Felix Posted March 25, 2016 Author Report Posted March 25, 2016 Are you up to date? Yes, 1.21.4. Quote
Dr. McKay Posted March 31, 2016 Report Posted March 31, 2016 Sorry for the late reply. Does that specific offer always appear to be empty? 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.