Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-01-19, 11:45 AM   #1
tinyu
A Molten Giant
 
tinyu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 837
Trying to revice _Corpse

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.
__________________
"There's no such thing as too many addons."
Lothaer
Titan Dev Team Member.
  Reply With Quote
 

WoWInterface » Classic - AddOns, Compliations, Macros » Classic - AddOn Help/Support » Trying to revice _Corpse

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off