12-01-14, 01:15 PM | #1 |
Strange Talent Frame Error.
One of my users has reported an error that I can't seem to be able to track down. It seems to be pointing at the Blizzard Talent Frame but I'm in no way hooking into it and I think (hope) I'm largely taint free. Instead of pastebin I hope its okay to point directly at my github for code. It appears to occur with every other addon disabled besides my BlizzImp.
https://github.com/uutfboomheadshot/...aster/BlizzImp This is the full error : Code:
Message: ...rface\AddOns\Blizzard_TalentUI\Blizzard_TalentUI.lua:717: attempt to concatenate local 'tier' (a nil value) Time: 12/01/14 19:36:07 Count: 2 Stack: ...rface\AddOns\Blizzard_TalentUI\Blizzard_TalentUI.lua:717: in function `PlayerTalentFrame_SelectTalent' ...rface\AddOns\Blizzard_TalentUI\Blizzard_TalentUI.lua:40: in function `OnAccept' Interface\FrameXML\StaticPopup.lua:3945: in function `StaticPopup_OnClick' [string "*:OnClick"]:1: in function <[string "*:OnClick"]:1> Locals: tier = nil id = nil (*temporary) = PlayerTalentFrameTalents { 0 = <userdata> clearInfo = PlayerTalentFrameTalentsClearInfoFrame { } tier2 = PlayerTalentFrameTalentsTalentRow2 { } unspentText = <unnamed> { } talentGroup = 2 tier3 = PlayerTalentFrameTalentsTalentRow3 { } summariesShownWhenNoPrimary = true learnButton = PlayerTalentFrameTalentsLearnButton { } tier5 = PlayerTalentFrameTalentsTalentRow5 { } MainHelpButton = PlayerTalentFrameTalentsTutorialButton { } tier7 = PlayerTalentFrameTalentsTalentRow7 { } tier1 = PlayerTalentFrameTalentsTalentRow1 { } tier4 = PlayerTalentFrameTalentsTalentRow4 { } bg = PlayerTalentFrameTalentsBg { } tier6 = PlayerTalentFrameTalentsTalentRow6 { } } (*temporary) = "tier" (*temporary) = nil (*temporary) = nil (*temporary) = "attempt to concatenate local 'tier' (a nil value)" |
|
12-01-14, 01:45 PM | #2 |
This seems the most likely issue:
Code:
-- Target Frame Smooth Fade if( UnitExists("target") ) then if( tFrameHidden == true ) then UIFrameFadeIn( TargetFrame, fadeTime, 0, 1 ); tFrameHidden = false; end else UIFrameFadeOut( TargetFrame, fadeTime, 1, 0 ); tFrameHidden = true; end ======================================================================== Some other issues: Code:
PVPReadyDialog.leaveButton.Show = function() end -- Fixes button not disappearing (Why?) Code:
PVPReadyDialog.leaveButton:HookScript("OnShow", PVPReadyDialog.leaveButton.Hide) Code:
ConsoleExec( "CameraDistanceMaxFactor 9" ) Code:
SetCVar("CameraDistanceMaxFactor", 9) Code:
if(bRepair == true) then if(repCost <= GetMoney()) then RepairAllItems(); print("|cffffff00Items Repaired"); end end Code:
if(bRepair == true) and (repCost <= GetMoney()) then RepairAllItems(); print("|cffffff00Items Repaired"); end Code:
local _,_,iQuality,_,_,_,_,_,_,_,iPrice = GetItemInfo( itemLink ); local _, iCount = GetContainerItemInfo( bags, bagSlot ); ======================================================================== In blizzImpBars.lua: Code:
if ( visibilityChanged ) then UIParent_ManageFramePositions(); UpdateContainerFrameAnchors(); end ======================================================================== In blizzImpPVP.lua, another dangerous global leak: Code:
message = CreateFrame( "MessageFrame", "CustomMessageFrame", UIParent ); And a less dangerous one: Code:
local function InitMessage() killBlowCount = 0; In several places in several files, I see you're manually keeping track of the combat state by registering for PLAYER_REGEN_DISABLED and PLAYER_REGEN_ENABLED and toggling a boolean; it would be a lot simpler (and more accurate) to just check InCombatLockdown(). ======================================================================== In blizzImpUF.lua: Code:
local isInVehicle = UnitControllingVehicle("player"); if( isInVehicle == true ) then SetUnitFrames(); end if ( UnitHasVehiclePlayerFrameUI("player") ) then SetUnitFrames(); end Code:
if( UnitControllingVehicle("player") or UnitHasVehiclePlayerFrameUI("player") ) then SetUnitFrames(); end
__________________
Retired author of too many addons. Message me if you're interested in taking over one of my addons. Don’t message me about addon bugs or programming questions. |
|
12-01-14, 03:36 PM | #3 |
Thank you for the code review Phanx. I've cleaned up those 3 global issues and merged the if statements.
I'd removed UIFrameFadeIn / Out in my local build trying to solve it to no avail but it turns out the taint was caused by ToggleTalentFrame() in my Micro Menu code. Much appreciated! |
|
WoWInterface » Developer Discussions » Lua/XML Help » Strange Talent Frame Error. |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|