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
if not IsPlayerInGroup(savedPlayer) and IsFriend(savedPlayer) then
for iD = 1, GetNumFriends() do
if GetFriendInfo(iD) == (savedPlayer, nil, PLAYER_STATUS_ONLINE, nil) then
the formatting of these keeps messing me up.. ive tried in brackets etc. Any suggestions for something I've missed?