Trying to revive an addon called
_Corpse
I am making the necessary C_FriendList changes and I am getting this error
Code:
Date: 2019-12-02 04:09:02
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\_Corpse\_Corpse.Standard.lua line 305:
function arguments expected near '.'
Debug:
[C]: ?
this line in question looks like this
Code:
self:C_FriendList.AddFriend( Name );
before the change it was this
Code:
self:AddFriend( Name );
This is the entire section of code it is in
Code:
--[[****************************************************************************
* Function: _Corpse.Standard:Update *
****************************************************************************]]
function me:Update ( Name )
local PlayerName = UnitName( "player" );
if ( Name == PlayerName ) then -- Our own corpse
_Corpse.BuildCorpseTooltip( false, PlayerName,
UnitLevel( "player" ), UnitClass( "player" ), GetRealZoneText(), 1,
( UnitIsAFK( "player" ) and CHAT_FLAG_AFK ) or ( UnitIsDND( "player" ) and CHAT_FLAG_DND ) );
elseif ( self.Enemies[ Name ] ~= nil ) then
_Corpse.BuildCorpseTooltip( true, Name, nil, nil, nil, self.Enemies[ Name ] );
self:InviteUnit( Name );
else
if ( C_FriendList.GetFriendInfo( Name ) ) then -- Player already a friend
ShowFriends();
-- Build tooltip with possibly old data
_Corpse.BuildCorpseTooltip( false, C_FriendList.GetFriendInfo( Name ) );
else
if ( self.Allies[ Name ] ~= nil ) then
_Corpse.BuildCorpseTooltip( false, Name , nil, nil, nil,
self.Allies[ Name ] == 0 and 0 or false ); -- Don't fill in if last seen online
end
self:C_FriendList.AddFriend( Name );
end
end
end
Thank you for any and all help.