GetFriendInfo help
im working on additional feature for my addon and having issues with the "GetFriendInfo()". Im looking to find a specific friend in friends list and check if they're online before executing code. im currently messing with this sort of thing.
Code:
local savedPlayer = xxx.savedVariables.savedPlayer |
I use the FRIENDS_LIST_MANAGER for this, e.g.
Code:
local masterList = FRIENDS_LIST_MANAGER:GetMasterList() Code:
local friendData = FRIENDS_LIST_MANAGER:FindDataByDisplayName(displayName) |
Quote:
You need to store each return value you want to compare into a local variable and then compare each of them separately: Lua Code:
|
oh cool ty.. but my issue is retriving that data...i can getinfo(somebody) but the specific info like which friend and online status etc from it is confusing me.
Oh i think i get it... and for the info i dont want put _? *EDIT* OK got it ty.. its just for a single saved player and your corrections there worked perfectly ty so much! :) |
No need to loop through anything at all or make additional API calls if you just use the FRIENDS_LIST_MANAGER:FindDataByDisplayName(displayName) - all the info you could ever need is just there for takin. :banana:
|
Quote:
And as others have mentioned, you do not actually need to loop over the friend data yourself, since ZOS already has a method that does it for you. You can check the code on github. |
All times are GMT -6. The time now is 08:52 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI