aatmjeets Posted June 13, 2020 Report Posted June 13, 2020 console.log(item.actions.link) shows undefined when executed. Quote
Dr. McKay Posted June 14, 2020 Report Posted June 14, 2020 item.actions is an array. You need to find the action you want. aatmjeets 1 Quote
aatmjeets Posted June 14, 2020 Author Report Posted June 14, 2020 for (item of inventory){ var gg = item.actions.values(); console.log(gg.next().value); } this function in manager.getUserInventoryContents gives below mentioned output, how to get link out from the array? i have tried some things but can't figure out. Please help! { link: 'steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S%owner_steamid%A%assetid%D14331270147200298841', name: 'Inspect in Game...' } Quote
Dr. McKay Posted June 15, 2020 Report Posted June 15, 2020 You need to replace %owner_steamid% with the 64-bit SteamID of the item's owner, and %assetid% with the item's ID. Quote
vrtgn Posted June 16, 2020 Report Posted June 16, 2020 On 6/14/2020 at 3:57 PM, aatmjeets said: how to get link out from the array? let link = ""; for (let action of item.actions) { if (action.name === 'Inspect in Game...') { link = action.link; break; } } Quote
aatmjeets Posted June 24, 2020 Author Report Posted June 24, 2020 Thanks for the kind reply. if have done this with out a loop like this var gg = item.actions; var str = gg[0].link; This worked for me. 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.