Questie

Questie

116M Downloads

LUA Error When Mousing Over Target of Target

TheWielder opened this issue ยท 1 comments

commented

Hi,

I noticed that when hovering over the target of target (I use the latest version of TukUI), that an LUA error would appear. To create it, I often can go to the bank in Stormwind and find someone targeting a banker. The issue occurs anytime the target of target is available from targeting another character.

Here's the LUA Error:
Message: Interface\AddOns\Questie\Modules\QuestieTooltips.lua:80: Usage: UnitGUID("unit")
Time: Mon Oct 7 19:52:06 2019
Count: 3
Stack: Interface\AddOns\Questie\Modules\QuestieTooltips.lua:80: Usage: UnitGUID("unit")
[C]: in function UnitGUID' Interface\AddOns\Questie\Modules\QuestieTooltips.lua:80: in function <Interface\AddOns\Questie\Modules\QuestieTooltips.lua:75> [C]: ? [C]: ? [C]: in function SetUnit'
Interface\FrameXML\UnitFrame.lua:291: in function `UnitFrame_UpdateTooltip'
Interface\FrameXML\UnitFrame.lua:277: in function <Interface\FrameXML\UnitFrame.lua:264>

Locals: (*temporary) = nil

I am using Questie v4.1.2_BETA-dff5a12. I hadn't noticed the issue on v4.1.1.

Thanks!

commented

Repost from discord, since it applies to this ticket.
I added
if not unitToken then return end
to
local function TooltipShowing_unit(self)
at line 80 and no more errors and everything works fine
I added some prints and I think what happens is the first call on extra strange units like targettarget etc returns slower/nil at first, but returns correct in next frame. so basically adding nil check removes error but user never actually sees a missing tooltip, cause it just self corrects near instantly