Eric Posted July 26, 2017 Report Posted July 26, 2017 Getting different keys in tags sometimes on tradeOffer.itemsToReceive.I'm trying to parse items after a trade to store the attributes in my database but I've noticed that I get different keys in "tags" sometimes.The functions I use are "tradeOfferManager.getOffer()" and "tradeOfferManager.on('sentOfferChanged', function (offer, oldState)". The problem is that when for example try to get type Heres the EconItem I usally get: I do tags[0].name, but in the second example the type "Key" can be found on key " localized_tag_name". Is there more too it with other keys in the "tags" array, Im not sure how to debug it since I get this rarely. EconItem { appid: 730, contextid: '2', assetid: '11196760158', classid: '2209624701', instanceid: '143865972', amount: 1, missing: true, icon_url: '-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXX7gNTPcUxuxpJSXPbQv2S1MDeXkh6LBBOievzZVMy1aKeJG4R6YzgzNPclaCmN72ClDNQvJMmjLyVoY-mjQTi_EM9amztZNjCYKtxNio', icon_url_large: '', icon_drag_url: '', name: 'Spectrum Case Key', market_hash_name: 'Spectrum Case Key', market_name: 'Spectrum Case Key', name_color: 'D2D2D2', background_color: '', type: 'Base Grade Key', tradable: true, marketable: true, commodity: true, market_tradable_restriction: 7, fraudwarnings: [], descriptions: [ { type: 'html', value: 'This key only opens Spectrum cases', app_data: '' }, { type: 'html', value: ' ', app_data: '' }, { type: 'html', value: '', color: '00a000', app_data: { limited: '1' } } ], owner_descriptions: [], tags: [ { internal_name: 'CSGO_Tool_WeaponCase_KeyTag', name: 'Key', category: 'Type', category_name: 'Type' }, { internal_name: 'normal', name: 'Normal', category: 'Quality', category_name: 'Category' }, { internal_name: 'Rarity_Common', name: 'Base Grade', category: 'Rarity', color: 'b0c3d9', category_name: 'Quality' } ], id: '11196760158', actions: [], owner_actions: [], market_marketable_restriction: 0 } and heres the one I get at random times with different key(localized_tag_name): EconItem { appid: 730, contextid: '2', assetid: '11195150025', classid: '2209624701', instanceid: '143865972', amount: 1, missing: true, currency: false, background_color: '', icon_url: '-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXX7gNTPcUxuxpJSXPbQv2S1MDeXkh6LBBOievzZVMy1aKeJG4R6YzgzNPclaCmN72ClDNQvJMmjLyVoY-mjQTi_EM9amztZNjCYKtxNio', icon_url_large: '', descriptions: [ { type: 'html', value: 'This key only opens Spectrum cases' }, { type: 'html', value: ' ' }, { type: 'html', value: '', color: '00a000' } ], tradable: false, name: 'Spectrum Case Key', name_color: 'D2D2D2', type: 'Base Grade Key', market_name: 'Spectrum Case Key', market_hash_name: 'Spectrum Case Key', commodity: false, market_tradable_restriction: 7, marketable: false, tags: [ { category: 'Type', internal_name: 'CSGO_Tool_WeaponCase_KeyTag', localized_category_name: 'Type', localized_tag_name: 'Key' }, { category: 'Quality', internal_name: 'normal', localized_category_name: 'Category', localized_tag_name: 'Normal' }, { category: 'Rarity', internal_name: 'Rarity_Common', localized_category_name: 'Quality', localized_tag_name: 'Base Grade', color: 'b0c3d9' } ], id: '11195181042', fraudwarnings: [], owner_descriptions: [], actions: [], owner_actions: [], market_marketable_restriction: 0} Thanks Quote
Dr. McKay Posted July 26, 2017 Report Posted July 26, 2017 Steam sends the data differently sometimes. Update to 2.8.1 and I've made the tags objects all be standard (that is, they have all the properties). Eric 1 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.