HandyNotes: The War Within

HandyNotes: The War Within

592k Downloads

GetFactionINFO Errors in plugins when reputation is set to inactive. (Shadowlands plugin)

instant0 opened this issue ยท 4 comments

commented

ADDON VERSION: Version: v1.6.17 + Shadowlands 62

Describe the bug
It seems that if a user has set several reputations to 'inactive' in their reputation page and enters a zone such as shadowlands they might get several lua errors related to GetFactionInfoByID calls

core/util.lua:127
zones/korthia.lua:38

Were the two that I got repeated errors pointing to. One I got rid of first by commenting out, other by enabling inactive reputations on my character.

Then checked some more and think maybe the API change is real fix?

Message: ...face/AddOns/HandyNotes_Shadowlands/zones/korthia.lua:38: attempt to call global 'GetFactionInfoByID' (a nil value)
Time: Fri Jul 26 01:42:39 2024
Count: 1
Stack: ...face/AddOns/HandyNotes_Shadowlands/zones/korthia.lua:38: attempt to call global 'GetFactionInfoByID' (a nil value)
[string "=[C]"]: in function GetFactionInfoByID' [string "@Interface/AddOns/HandyNotes_Shadowlands/zones/korthia.lua"]:38: in function CanDisplay'
[string "@Interface/AddOns/HandyNotes_Shadowlands/core/map.lua"]:149: in function IsNodeEnabled' [string "@Interface/AddOns/HandyNotes_Shadowlands/core/core.lua"]:219: in function (for generator)'
[string "@Interface/AddOns/HandyNotes/HandyNotes.lua"]:446: in function UpdateMinimapPlugin' [string "@Interface/AddOns/HandyNotes/HandyNotes.lua"]:505: in function ?'
[string "@Interface/AddOns/HandyNotes_Shadowlands/core/core.lua"]:287: in function `RefreshImmediate'
[string "@Interface/AddOns/HandyNotes_Shadowlands/core/core.lua"]:282: in function <...nterface/AddOns/HandyNotes_Shadowlands/core/core.lua:280>

API Change?
https://warcraft.wiki.gg/wiki/API_C_Reputation.GetFactionDataByID

Fixed the error with this in zones/korthia.lua

-- local research = select(3, GetFactionInfoByID(2472)) -- old line 38
local research = C_Reputation.GetFactionDataByID(2472)
if node.research and research.currentStanding < node.research then return false end

commented

Please update Handynotes and HandyNotes: Shadowlands to v63.

commented

Interesting, when you press download on curse it selects v62, but if you go into files you can pick v63.

commented

I guess this can be closed now?

commented

Yes, 63 no errors.