Jump to content
McKay Development

inventory is undefined


EliteOneTUbe

Recommended Posts

The line that the error pops up : 

manager.getUserInventoryContents('76561198083528564', 440, 2, true, function (error, inventory) {
                        console.log(inventory.length);
                        for(let l = 0 ; l < inventory.length; l++) {
                            if(inventory[l].market_hash_name == prices[i].name) itemid = inventory[l].assetid;
                        }
})

Error: 

post-1563-0-99560500-1556566614_thumb.png

Edited by EliteOneTUbe
Link to comment
Share on other sites

Check error.

{ Error: The request is a duplicate and the action has already occurred in the past, ignored this time
    at C:\Users\Nick\Desktop\botv2\node_modules\steamcommunity\components\users.js:440:12
    at SteamCommunity._checkHttpError (C:\Users\Nick\Desktop\botv2\node_modules\steamcommunity\components\http.js:110:3)    at Request._callback (C:\Users\Nick\Desktop\botv2\node_modules\steamcommunity\components\http.js:50:61)
    at Request.self.callback (C:\Users\Nick\Desktop\botv2\node_modules\request\request.js:185:22)
    at Request.emit (events.js:182:13)
    at Request.<anonymous> (C:\Users\Nick\Desktop\botv2\node_modules\request\request.js:1161:10)
    at Request.emit (events.js:182:13)
    at Gunzip.<anonymous> (C:\Users\Nick\Desktop\botv2\node_modules\request\request.js:1083:12)
    at Object.onceWrapper (events.js:273:13)
    at Gunzip.emit (events.js:187:15) eresult: '29' }
Link to comment
Share on other sites

That's not necessarily what that means. What exactly that error means is pretty much unknown. The takeaway here should be that you need to catch and handle errors, or else your stuff will crash.

I guess its time for me to google how to handle errors

Edited by EliteOneTUbe
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...