
ThreatPlates-12.2.0-beta1-cata HealerTrackerWidget Error
Closed this issue ยท 5 comments
Cataclysm Classic Live: 4.4.2.60192 enUS
ThreatPlates: 12.2.0-beta1
2 errors showing on login (Shaman L85 character)
1x ...yPlates_ThreatPlates/Widgets/HealerTrackerWidget.lua:528: 'for' limit must be a number
[string "@TidyPlates_ThreatPlates/Widgets/HealerTrackerWidget.lua"]:528: in main chunk
Locals:
ADDON_NAME = "TidyPlates_ThreatPlates"
Addon = <table> {
IS_WRATH_CLASSIC = false
Theme = <table> {
}
TotemCreatureType = "Totem"
AurasFilterMode = <table> {
}
IS_CATA_CLASSIC = true
ANCHOR_POINT_SETPOINT = <table> {
}
CVars = <table> {
}
THREAT_VALUE_TYPE = <table> {
}
Font = <table> {
}
WOW_USES_CLASSIC_NAMEPLATES = true
IGNORED_STYLES = <table> {
}
PlatesByUnit = <table> {
}
Animations = <table> {
}
ThreatPlates = <table> {
}
ANCHOR_POINT_TEXT = <table> {
}
IS_TBC_CLASSIC = false
MODE_FOR_STYLE = <table> {
}
TotemInformation = <table> {
}
ON_UPDATE_PER_FRAME = 0.001000
CUSTOM_PLATES_GLOW_FRAMES = <table> {
}
Debug = <table> {
}
PlatesByGUID = <table> {
}
EventHandler = <table> {
}
LibUTF8 = <table> {
}
Logging = <table> {
}
PLATE_FADE_IN_TIME = 0.500000
ANCHOR_POINT = <table> {
}
CASTBAR_INTERRUPT_HOLD_TIME = 1
PlayerName = "Hoovesofury"
TOTEMS = <table> {
}
ON_UPDATE_INTERVAL = 0.250000
IS_CLASSIC = false
IGNORED_STYLES_WITH_NAMEMODE = <table> {
}
IS_CLASSIC_SOD = false
Widgets = <table> {
}
CUSTOM_GLOW_WRAPPER_FUNCTIONS = <table> {
}
CUSTOM_GLOW_FUNCTIONS = <table> {
}
LEGACY_CUSTOM_NAMEPLATES = <table> {
}
TARGET_TEXTURES = <table> {
}
Cache = <table> {
}
IS_MAINLINE = false
DEFAULT_FONT = "Cabin"
UIScale = 1
ADDON_DIRECTORY = "Interface\AddOns\TidyPlates_ThreatPlates\"
DEBUG = true
BackdropTemplate = "BackdropTemplate"
PlatesCreated = <table> {
}
Data = <table> {
}
DEFAULT_SMALL_FONT = "Arial Narrow"
PlayerClass = "SHAMAN"
GLOW_TYPES = <table> {
}
PlatesVisible = <table> {
}
}
Widget = <table> {
RegistedUnitEvents = <table> {
}
WidgetHandler = <table> {
}
Name = "HealerTracker"
}
GetArenaOpponentSpec = nil
PlatesByGUID = <table> {
}
and
8x ...ns/TidyPlates_ThreatPlates/Widgets/WidgetHandler.lua:255: attempt to call method 'IsEnabled' (a nil value)
[string "@TidyPlates_ThreatPlates/Widgets/WidgetHandler.lua"]:255: in function `InitializeWidget'
[string "@TidyPlates_ThreatPlates/Widgets/WidgetHandler.lua"]:265: in function `InitializeAllWidgets'
[string "@TidyPlates_ThreatPlates/Core.lua"]:275: in function `ReloadTheme'
[string "@TidyPlates_ThreatPlates/Options.lua"]:11308: in function `?'
[string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...Ons/Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:109>
[string "=[C]"]: ?
[string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...Ons/Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `Fire'
[string "@Ace3/AceDB-3.0-31/AceDB-3.0.lua"]:476: in function `SetProfile'
[string "@TidyPlates_ThreatPlates/Database.lua"]:1511: in function `MigrateDatabase'
[string "@TidyPlates_ThreatPlates/Core.lua"]:328: in function `CheckForFirstStartUp'
[string "@TidyPlates_ThreatPlates/Core.lua"]:408: in function <TidyPlates_ThreatPlates/Core.lua:407>
[string "=[C]"]: ?
[string "@Ace3/AceAddon-3.0-13/AceAddon-3.0.lua"]:66: in function <Ace3/AceAddon-3.0/AceAddon-3.0.lua:61>
[string "@Ace3/AceAddon-3.0-13/AceAddon-3.0.lua"]:523: in function `EnableAddon'
[string "@Ace3/AceAddon-3.0-13/AceAddon-3.0.lua"]:626: in function <Ace3/AceAddon-3.0/AceAddon-3.0.lua:611>
Locals:
self = <table> {
RegisteredEventsByWidget = <table> {
}
EventHandlerFrame = Frame {
}
Widgets = <table> {
}
EnabledTargetWidgets = <table> {
}
EnabledWidgets = <table> {
}
}
widget_name = "HealerTracker"
widget = <table> {
RegistedUnitEvents = <table> {
}
WidgetHandler = <table> {
}
Name = "HealerTracker"
}
(*temporary) = nil
(*temporary) = <table> {
RegistedUnitEvents = <table> {
}
WidgetHandler = <table> {
}
Name = "HealerTracker"
}
(*temporary) = "attempt to call method 'IsEnabled' (a nil value)"
Ah, I forgot to update that. I will upload a new beta version in a few minutes.
First error has a trivial cause, there is no _G.MAX_ARENA_ENEMIES for the Cataclysm client until the arena blizzard addon loads? (I guess)
/dump C_AddOns.IsAddOnLoaded("Blizzard_ArenaUI")
reports false,false
Edit: Fixing the first one gets rid of the second error (unsurprisingly :D)
Yeah, I noticed that while testing, but did not add it to the code before I commited it :D
I am not sure if this depends on the ArenaUI being loaded. Interesting idea. The global is available on retail, even outside of arenas, but not on Cata Classic. I just set a default value of 5. With that, it should work.
I tested running /run C_AddOns.LoadAddOn("Blizzard_ArenaUI")
followed by /dump MAX_ARENA_ENEMIES
and it works.
So alternatively it could look for an ADDON_LOADED event or UIParentLoadAddOn
that thing if it's not loaded before referencing the global (on Cata and potentially MoP? Classic)