Addon still works partly but I get a spamy error, please someone help?
Error Code:
Code:
439x LinkHover\LinkHover-1.5.lua:34: attempt to index local 'linkData' (a nil value)
LinkHover\LinkHover-1.5.lua:34: in function <LinkHover\LinkHover.lua:33>
Locals:
frame = ChatFrame1 {
0 = <userdata>
RefreshIfNecessary = <function> defined =[C]:-1
OnPostShow = <function> defined =[C]:-1
isInitialized = 1
GetNumVisibleLines = <function> defined =[C]:-1
ScrollUp = <function> defined =[C]:-1
SetTimeVisible = <function> defined =[C]:-1
hasOwnFontObject = true
OnFontObjectUpdated = <function> defined =[C]:-1
resizeButton = ChatFrame1ResizeButton {
}
GetFading = <function> defined =[C]:-1
Clear = <function> defined =[C]:-1
shouldFadeAfterInactivity = true
SetIndentedWordWrap = <function> defined =[C]:-1
GetTimeVisible = <function> defined =[C]:-1
GetJustifyV = <function> defined =[C]:-1
SetFont = <function> defined =[C]:-1
GetMaxLines = <function> defined =[C]:-1
BackFillMessage = <function> defined =[C]:-1
UnpackageEntry = <function> defined =[C]:-1
FontStringContainer = <unnamed> {
}
SetShadowOffset = <function> defined =[C]:-1
messageTypeList = <table> {
}
GetFont = <function> defined =[C]:-1
checkedGMOTD = true
SetMaxLines = <function> defined =[C]:-1
timeVisibleSecs = 20
PageUp = <function> defined =[C]:-1
RefreshDisplay = <function> defined =[C]:-1
SetFontObject = <function> defined =[C]:-1
MakeFontObjectCustom = <function> defined =[C]:-1
CalculateNumVisibleLines = <function> defined =[C]:-1
fontObject = table: 0000020F9598DE60 {
}
overrideFadeTimestamp = 3738.725
SetInsertMode = <function> defined =[C]:-1
MarkDisplayDirty = <function> defined =[C]:-1
hasBeenFaded = true
mouseInTime = 0
GetMessageInfo = <function> defined =[C]:-1
ScrollDown = <function> defined =[C]:-1
AtTop = <function> defined =[C]:-1
GetFontObject = <function> defined =[C]:-1
zoneChannelList = <table> {
}
SetScrollOffset = <function> defined =[C]:-1
OnPostUpdate = <function> defined =[C]:-1
fontStringPool = <table> {
}
buttonSide = "right"
CanEffectivelyFade = <function> defined =[C]:-1
ScrollToBottom = <function> defined =[C]:-1
GetInsertMode = <function> defined =[C]:-1
insertMode = 2
oldAlpha = 0
OnPreSizeChanged = <function> defined =[C]:-1
fadeDurationSecs = 3
GetScrollOffset = <function> defined =[C]:-1
isDocked = 1
GetIndentedWordWrap = <function> defined =[C]:-1
alternativeDefaultLanguage = "Orcisch"
defaultLanguage = "Orcisch"
channelList = <table> {
}
GetTextColor = <function> defined =[C]:-1
tellTimer = 1805.66
ResetAllFadeTimes = <function> defined =[C]:-1
flashTimer = 0.41700015217066
isDisplayDirty = false
GetSpacing = <function> defined =[C]:-1
OnPreLoad = <function> defined =[C]:-1
visibleLines = <table> {
}
PackageEntry = <function> defined =[C]:-1
SetSpacing = <function> defined =[C]:-1
name = "Allgemein"
ScrollToTop = <function> defined =[C]:-1
historyBuffer = <table> {
}
isLayoutDirty = false
AdjustMessageColors = <function> defined =[C]:-1
GetNumMessages = <function> defined =[C]:-1
RefreshLayout = <function> defined =[C]:-1
GetShadowColor = <function> defined =[C]:-1
isUninteractable = false
AddMessage = <function> defined @Ace3\AceHook-3.0\AceHook-3.0.lua:100
GetJustifyH = <function> defined =[C]:-1
mouseOutTime = 0
PageDown = <function> defined =[C]:-1
GetMaxScrollRange = <function> defined =[C]:-1
SetJustifyH = <function> defined =[C]:-1
SetFadeDuration = <function> defined =[C]:-1
GetShadowOffset = <function> defined =[C]:-1
GetPagingScrollAmount = <function> defined =[C]:-1
SetTextColor = <function> defined =[C]:-1
AtBottom = <function> defined =[C]:-1
buttonFrame = ChatFrame1ButtonFrame {
}
SetShadowColor = <function> defined =[C]:-1
CalculateLineSpacing = <function> defined =[C]:-1
RemoveMessagesByPredicate = <function> defined =[C]:-1
InitializeFontableFrame = <function> defined =[C]:-1
HasFontObject = <function> defined =[C]:-1
clickAnywhereButton = ChatFrame1ClickAnywhereButton {
}
isStaticDocked = true
SetJustifyV = <function> defined =[C]:-1
editBox = ChatFrame1EditBox {
}
CalculateLineAlphaValueFromTimestamp = <function> defined =[C]:-1
isLocked = true
SetFading = <function> defined =[C]:-1
MarkLayoutDirty = <function> defined =[C]:-1
AcquireFo
AddOn Code:
Lua Code:
local showLinkType = {
-- Normal tooltip things:
achievement = true,
enchant = true,
glyph = true,
item = true,
instancelock = true,
quest = true,
spell = true,
talent = true,
unit = true,
currency = true,
-- Special tooltip things:
battlepet = false,
battlePetAbil = false,
garrfollowerability = false,
garrfollower = false,
garrmission = false,
}
local function OnHyperlinkEnter(frame, linkData, link)
local normal = showLinkType[linkData:match("^(.-):")]
if normal == true then
GameTooltip:SetOwner(ChatFrame1Tab, "ANCHOR_TOPLEFT", 20, 20)
GameTooltip:SetHyperlink(link)
GameTooltip:Show()
elseif normal == false then
-- Uses a special tooltip, just let the default function handle it.
SetItemRef(linkData, link, "LeftButton", frame)
end
end
local function OnHyperlinkLeave(frame, linkData, link)
local normal = showLinkType[linkData:match("^(.-):")]
if normal == true then
GameTooltip:Hide()
elseif normal == false then
-- Uses a special tooltip, just let the default function handle it.
SetItemRef(linkData, link, "LeftButton", frame)
end
end
local function RegisterFrame(frame)
frame:SetScript("OnHyperlinkEnter", OnHyperlinkEnter)
frame:SetScript("OnHyperlinkLeave", OnHyperlinkLeave)
end
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_LOGIN")
f:SetScript("OnEvent", function(self, event, name)
if event == "PLAYER_LOGIN" then
for i = 1, NUM_CHAT_WINDOWS do
RegisterFrame(_G["ChatFrame"..i])
end
end
if GuildBankMessageFrame then
RegisterFrame(GuildBankMessageFrame)
self:UnregisterAllEvents()
self:SetScript("OnEvent", nil)
RegisterFrame = nil
else
self:RegisterEvent("ADDON_LOADED")
end
end)