Thread Tools Display Modes
Prev Previous Post   Next Post Next
11-20-22, 10:06 PM   #1
reyard
A Defias Bandit
Join Date: Nov 2022
Posts: 2
Can you help me?

Hi I have a problem with this simple addon.
It's the code:

Code:


local addonName = ...
local f = CreateFrame ("frame")
f.db = {}

f:RegisterEvent ("ADDON_LOADED")
f:RegisterEvent ("TALKINGHEAD_REQUESTED")

f:SetScript ("OnEvent", function (self, event, arg1)
	if (event == "TALKINGHEAD_REQUESTED") then
		local displayInfo, cameraID, vo, duration, lineNumber, numLines, name, text, isNewTalkingHead = C_TalkingHead.GetCurrentLineInfo()
		if (f.db.already_saw [vo]) then
			C_Timer.After (1, TalkingHeadFrame_CloseImmediately)
		else
			f.db.already_saw [vo] = true
		end
	elseif (event == "ADDON_LOADED" and arg1 == addonName) then
		TalkingHeadRemovalDB = TalkingHeadRemovalDB or {already_saw = {}}
		if (not TalkingHeadRemovalDB.already_saw) then
			TalkingHeadRemovalDB.already_saw = {}
		end
		f.db = TalkingHeadRemovalDB
	end
end)
It works fine but It have LUA error.

Code:
1x Usage: C_Timer.After(seconds, callback)
[string "=[C]"]: in function `After'
[string "@YouOnlyHearOnce/YouOnlyHearOnce.lua"]:14: in function <YouOnlyHearOnce/YouOnlyHearOnce.lua:10>

Locals:
(*temporary) = "Usage: C_Timer.After(seconds, callback)"
This addon is an automatic close for talking head frame.
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Can you help me?


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