Jump to content
McKay Development

Recommended Posts

Posted

Hello there,

 

got some small problems in fetching item inspect link. I'm getting user inventory through getUserInventoryContents. When i get whole market_actions property it's working fine and giving me result with link and name. But when i try to get link property from market_actions, there's an error popping up  "Cannot read property '0' of undefined".

community.getUserInventoryContents("[U:1:884434522]", 730, 2, true, "polish", (err, inventory) => {
    if (err) {
        throw err;
    }
    for (let i=0; i<inventory.length; i++) {
         console.log(inventory[i].market_actions) // working
         console.log(inventory[i].market_actions[0].link) // not working

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...