outo Posted June 9, 2019 Report Posted June 9, 2019 client.on("friendsList", function(){ console.log(client.myFriends); });If I use this code I get a list.How can I get a integer number?Thank you! Quote
outo Posted June 10, 2019 Author Report Posted June 10, 2019 client.on("friendsList", function(){ druzya=client.myFriends; console.log(druzya); }); client.on("friendsList", function(){ console.log(client.myFriends.length); }); I tried it before. but if i use this code for some reason I get "undefined" Quote
Dr. McKay Posted June 10, 2019 Report Posted June 10, 2019 Oh yeah, it's an object. Object.keys(client.myFriends).filter(steamID => client.myFriends[steamID] == SteamUser.EFriendRelationship.Friend).length 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.