
LUA Error, Shadowlands, Maldraxux, Mouseover: Spouting Growth
fubaWoW opened this issue ยท 2 comments
ADDON VERSION: v199
Error appears when...
Mouseover: Spouting Growth
19x HandyNotes_Shadowlands/core/hook.lua:285: attempt to index field 'group' (a nil value)
[HandyNotes_Shadowlands/core/hook.lua]:285: in function <HandyNotes_Shadowlands/core/hook.lua:281>
[C]: ?
[C]: ?
[C]: ?
Locals:
self = Frame {
isUnique = false
vignetteID = 4202
SuperTrackGlow = Texture {
}
endScale = 1.200000
normalizedX = 0.386864
scaleFactor = 1
HighlightTexture = Texture {
}
pinTemplate = "VignettePinTemplate"
pinFrameLevelType = "PIN_FRAME_LEVEL_VIGNETTE"
normalizedY = 0.470626
vignetteInfo = <table> {
}
vignetteGUID = "Vignette-0-4250-2222-107-4202-00005E179B"
name = "Spouting Growth"
superTracked = false
startScale = 1
owningMap = WorldMapFrame {
}
SuperTrackMarker = Texture {
}
Texture = Texture {
}
pinFrameLevelIndex = 1
dataProvider = <table> {
}
hasTooltip = true
}
hookInfo = <table> {
rewardsSpaceBefore = true
vignetteIDs = <table> {
}
__address = "000002062F333B10"
rewards = <table> {
}
rewardsSpaceAfter = false
__class = <table> {
}
}
mapID = 1536
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field 'group' (a nil value)"
ns = <table> {
GROUP_HIDDEN75 = <table> {
}
NameResolver = <table> {
}
api = <table> {
}
class = "PALADIN"
groups = <table> {
}
COLORS = <table> {
}
tomtom = <table> {
}
world_map_button = Krowi_WorldMapButtons4 {
}
maps = <table> {
}
tooltip = <table> {
}
icons = <table> {
}
plugin_name = "HandyNotes: Shadowlands"
hooks = <table> {
}
MinimapDataProvider = HandyNotes_ShadowlandsMinimapDP {
}
Interval = <table> {
}
node = <table> {
}
Map = <table> {
}
poi = <table> {
}
addon = <table> {
}
Group = <table> {
}
requirement = <table> {
}
status = <table> {
}
group_types = <table> {
}
options = <table> {
}
professions = <table> {
}
reward = <table> {
}
optionDefaults = <table> {
}
locale = <table> {
}
faction = "Horde"
color = <table> {
}
WorldMapDataProvider = <table> {
}
RiftMap = <table> {
}
covenants = <table> {
}
GROUP_ALPHA75 = <table> {
}
GROUP_HIDDEN = <table> {
}
expansion = 9
hook = <table> {
}
}
a "simple" fix would be:
- edit "hook.lua" at
line 283
- replace
if not hookInfo then return end
withif not hookInfo or not hookInfo.group then return end
or replace the whole hook like this:
hooksecurefunc(VignettePinMixin, 'OnMouseEnter', function(self)
-- Early validation: Check if hook info exists
local hookInfo = ns.hooks.vignette[self.vignetteID]
if not hookInfo or not hookInfo.group then
return
end
-- Cache frequently accessed objects
local currentMap = self:GetMap()
if not currentMap then return end
local mapID = currentMap.mapID
if not hookInfo.group:GetDisplay(mapID) then
return
end
-- Validate vignette data exists
local vignetteGUID = self.vignetteGUID
if not vignetteGUID then return end
-- Get position with error handling
local pos = C_VignetteInfo.GetVignettePosition(vignetteGUID, mapID)
if not pos or not pos.x or not pos.y then
return
end
-- Calculate coordinates and validate node exists
local coordinates = HandyNotes:getCoord(pos.x, pos.y)
local mapNodes = ns.maps[mapID]
if not mapNodes or not mapNodes.nodes then
return
end
local node = mapNodes.nodes[coordinates]
if not node then return end
-- Update hook info with node data
hookInfo.note = node.note
hookInfo.rewards = node.rewards
-- Render tooltip with validated data
renderTooltip(self, hookInfo)
end)
this will prevent all possible "nil" errors and "NIL Checks" should be done EVERYWHERE to prevent errors!