ThePlata Posted January 30, 2019 Report Posted January 30, 2019 How do I get the names of all available games on steam displaying on the website? Here's my code. It just displays a blank page for like 5 seconds and displays an "Already logged on, cannot log on again" error. How do I properly display it? client.on("appOwnershipCached", () => { let gameArr = client.getOwnedApps(); client.getProductInfo( gameArr, [], (err, apps, packages, unknownApps, unknownPackages) => { for (var appid in apps) { res.send(apps[appid].appinfo.common.name); } } ); }); Quote
Dr. McKay Posted January 30, 2019 Report Posted January 30, 2019 I would assume that you're only supposed to call res.send once. Quote
ThePlata Posted January 31, 2019 Author Report Posted January 31, 2019 I would assume that you're only supposed to call res.send once.Yes you're right. So what you're suggesting it I store the values in an array and res.send it once? Wouldn't it be the same since you're still looping it? Quote
ThePlata Posted January 31, 2019 Author Report Posted January 31, 2019 I would assume that you're only supposed to call res.send once.I figured a way to do it. Thanks Quote
Dr. McKay Posted January 31, 2019 Report Posted January 31, 2019 Yes you're right. So what you're suggesting it I store the values in an array and res.send it once? Wouldn't it be the same since you're still looping it? Yes, store the results in an array during the loop then call res.send at the end. I figured a way to do it. Thanks It would help future people if you posted your solution. 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.