Jump to content
McKay Development

Mr Game and Watch

Member
  • Posts

    36
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Mr Game and Watch's Achievements

  1. Ups, sorry about that. I deleted that line, but in my code there's a return there (I guess I deleted that line by mistake). This is what happens in the second function (the "non-working" one): It loads the offer (with a null id in that moment), loads the items and set the message. Then, it sends correctly the offer. It checks if the status is "pending" (it is). But it goes to error, saying that it can't confirm an offer with null id. I'm working with the solution Vanilla told, but... I wanted to know why that happened. It's just curious. Thanks Dr. McKay
  2. I'll try that. But I'm kinda worried. I mean: Now I can avoid this null problem with counter, but... what wold happen if I need more functions to send objects? That would be a problem. Thanks Vanilla. I'l try that. Has this error happened to you before? I mean, get null info of your offers.
  3. Hello! I'm trying to send automatic offers. I have two functions for doing this: One for the ones I want to send and other to send counter offers. The first one works perfect (Thanks again for helping me with that), then I decided to copy-paste that for the second and change it a little. But here's what is strange: the couner function can send offers, but can't confirm them because the offer id is always null. Here are the 2 offers objects: TradeOffer { partner: censored, id: '2192436500', message: 'Here's your trade', state: 9, itemsToGive: [ ... ], itemsToReceive: [ ... ], isOurOffer: true, created: 2018-01-21T11:03:44.021Z, updated: 2018-01-21T11:03:44.021Z, expires: 2018-02-04T11:03:44.021Z, tradeID: null, fromRealTimeTrade: false, confirmationMethod: 2, escrowEnds: null, rawJson: '' } And this is the wrong one: TradeOffer { partner: censored, id: null, message: 'That was not the correct price. Here's what I wanted.', state: 1, itemsToGive: [ ... ], itemsToReceive: [ ... ], isOurOffer: true, created: null, updated: null, expires: null, tradeID: null, fromRealTimeTrade: false, confirmationMethod: null, escrowEnds: null, rawJson: '' } Here is the working one: var offer = manager.createOffer(item.trade_route); offer.addMyItems(items_to_send); offer.addTheirItem({"appid": 440, "contextid": 2, "assetid": item.currentID}); offer.setMessage("Here's your trade"); offer.send(function(err, status) { if (err) { console.log(err); return; } console.log(offer); //here's the one I posted above if (status == 'pending') { console.log(`Offer #${offer.id} sent, but requires confirmation`); setTimeout( function(){ community.acceptConfirmationForObject(key, offer.id, function(err) { if (err) { console.log(err); } else { console.log("Offer " + offer.id +" confirmed"); } }); }, 2000 ); } else { console.log(`Offer #${offer.id} sent successfully`); } }); Here's the worng one (counter offer): var offer = manager.createOffer(trade_url); manager.loadUserInventory(user_id, 440, 2, false, function (err, inventory, currencies) { if ('code for validating other things') { offer.addMyItem(...); offer.addTheirItems(items_to_send); offer.setMessage("That was not the correct price. Here's what I wanted."); offer.send(function (err, status) { if (err) { console.log(err); } if (status == 'pending') { console.log(offer) // Here's the one I posted above setTimeout(function () { community.acceptConfirmationForObject(key, offer.id, function (err) { if (err) { console.log(err); } else { console.log("Offer " + offer.id + " confirmed"); } }); }, 4000); } else { console.log(`Offer #${offer.id} sent successfully`); } }); } else { console.log("Validation failed") ... non related code } }); }); Why the second one can't have the offer.id? Any kinf of help would be aprreciated Note: I had to remove the non-related code and coments... sorry if you test it and fails.
  4. Thanks. Now it works (Or looks like for me). Again, thanks you and happy holidays. You deserve the best!!!
  5. Sorry to ask again about this, but I can't find that methods. In which modules are they? I can only find "GetOffer" or "GetOffers" on your "node-steam-tradeoffer-manager" module. (I tried that IDs, dind't work). Also, thanks for your time and happy holidays! Edit: I think I found that "tradeID", but I get always null: isOurOffer: false, created: 2017-12-24T13:58:46.000Z, updated: 2017-12-24T13:58:51.000Z, expires: 2018-01-07T13:58:46.000Z, tradeID: null, fromRealTimeTrade: false, confirmationMethod: 0, escrowEnds: null, Is this the tradeID you mean?
  6. Well... I'm stucked trying to get that work I make the trade. I confirm it and then I send a request like this: http://api.steampowered.com/IEconService/GetTradeStatus/v1/?key=*API key goes here*&format=json&tradeid=0123456789&get_descriptions=1&language=en the trade ID I send is the one I get for the confirmation. The API key is the one I have. OK. I check it before and after the trade is made... but I always get an empty JSON. What I'm doing wrong?
  7. OK. I'll check it out. Thanks you so much and merry christmas Dr. McKay
  8. Hello! I noticed that when I get an item from other people.. it's id change. Then, I have a question: If I have to return it... how can I make sure it's the same item? For example: I can have 2 TF2 items with the same quality, the same unusual effect and the same level. Is there a way to check it? Another "secret id" to check? Sorry if that was asked, but I didnt found it Thanks and have a nice day Edit: I found the main thread, "Identifying Steam Items", but I still don't get it, sorry
  9. OK. I just found a solution. Thanks for your answer!
  10. OK. I think I got what are you saying... but... how can I get the objectID of a market listing?
  11. Thanks for your answer! What do you mean as "the same way". I mean, for retrieve offers I use "manager.getOffers", but this method doesn't get Steam market confirmations. Is there a method to get them?
  12. Hello! I'm still working on my personal project to get rid of the Steam App. I can Get my Auth code, send offer and accept the incoming ones. But today I needed to sell an item on steam market... and then I realize I need to open the App. And I was looking the APIs information... but I don't find anithing about Steam market confirmations. Is there a way to confirm the market confirmations? Or my project will lack this feature because it's not possible to do that? I really try to avoid the App, because it blocks the other features some hours... Thanks for reading me, and have a happy gaming!
  13. Thanks for your answer. The weird part of this inactive offers is that when I try to accept, it says is inactive but I can see them in the web version and then I need to accept them with SteamApp Now it works ok again, but if this happens again I will re-open this topic with more details. Thanks again!
  14. Hello! Today I'm getting this error while accepting offers (incoming ones or the ones I create): Offer #XXXXXXXXX is not active, so it may not be accepted. Then, the only way I have to confirm the trade is using the mobile App and then stop the bot few hours to avoid this problem... but it persists. Waht does it mean is "not active"? How can I avoid it? Thanks for reading me!
  15. Well, I used "trade_I_want_to_accept" instead of recived[i] as, like you said, was no longer valid. Thanks again!
×
×
  • Create New...