Nico31 Posted March 25, 2021 Report Share Posted March 25, 2021 Hi all! Newbie question, I've declared the language in the constructor, but I'm not getting any item name in the 'newOffer' event. This is the rawJson I get from incoming offers { "tradeofferid": "4514010558", "accountid_other": xxxxxxxx, "message": "test offer", "expiration_time": 1617915913, "trade_offer_state": 2, "items_to_receive": [ { "appid": 753, "contextid": "6", "assetid": "16638623730", "classid": "2353210051", "instanceid": "0", "amount": "1", "missing": false, "est_usd": "4" }, { "appid": 753, "contextid": "6", "assetid": "16638623732", "classid": "2217483072", "instanceid": "0", "amount": "1", "missing": false, "est_usd": "3" } ], "is_our_offer": false, "time_created": 1616706313, "time_updated": 1616706315, "from_real_time_trade": false, "escrow_end_date": 0, "confirmation_method": 0 } Any tips? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 26, 2021 Report Share Posted March 26, 2021 Let me see your constructor code. Quote Link to comment Share on other sites More sharing options...
Nico31 Posted March 26, 2021 Author Report Share Posted March 26, 2021 (edited) Hi!, here you go const SteamUser = require(`steam-user`); const SteamCommunity = require(`steamcommunity`); const TradeOfferManager = require(`steam-tradeoffer-manager`); var steam = new SteamCommunity(); var client = new SteamUser({ enablePicsCache: true, changelistUpdateInterval: 60000 }); var manager = new TradeOfferManager({ steam: client, community: steam, language: `en`, globalAssetCache: true, savePollData: true, cancelTime: 60000, pendingCancelTime: 30000 }); I tried 'en' and 'es' as language. Also deleted node_modules folder and reinstalled all fresh but can't make it work. Thanks for the reply! Edited March 26, 2021 by Nico31 Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 27, 2021 Report Share Posted March 27, 2021 Use 'english' as the language. Quote Link to comment Share on other sites More sharing options...
Nico31 Posted March 28, 2021 Author Report Share Posted March 28, 2021 On 3/27/2021 at 12:21 AM, Dr. McKay said: Use 'english' as the language. Just tried that, no changes { "appid": 753, "contextid": "6", "assetid": "16658463991", "classid": "2353210051", "instanceid": "0", "amount": "1", "missing": false, "est_usd": "5" } Would it make any difference if I delete the appdata folders? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 28, 2021 Report Share Posted March 28, 2021 Wait, why are you looking at rawJson? Of course the item description wouldn't be in there. Quote Link to comment Share on other sites More sharing options...
Nico31 Posted March 29, 2021 Author Report Share Posted March 29, 2021 For debug purposes, I didn't know that. I'm using this code to log offered items log += `their items: ${offer.itemsToReceive.length} - `; if (offer.itemsToReceive.length > 0) { for (var i = 0; i < offer.itemsToReceive.length; i++) { log += `\n #${(i + 1)} - ${offer.itemsToReceive[i].name} | ${offer.itemsToReceive[i].type} | ${offer.itemsToReceive[i].market_hash_name}`; } } But always return undefined #1 - undefined | undefined | undefined #2 - undefined | undefined | undefined It's very strange, I tried the same code earlier in my laptop and worked fine. I have no clue what could be wrong, I'm just guessing that could be a corrupted file, or some node issue Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 29, 2021 Report Share Posted March 29, 2021 2 hours ago, Nico31 said: I'm just guessing that could be a corrupted file It's possible. You could try deleting the local cache. On Windows, delete the entire folder %localappdata%\doctormckay\node-steam-tradeoffer-manager Quote Link to comment Share on other sites More sharing options...
Nico31 Posted March 29, 2021 Author Report Share Posted March 29, 2021 Yup, that worked. Thanks for your time and amazing work! Quote Link to comment Share on other sites More sharing options...
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.