New bug: attempt to index local 'rgba'
sauljaffe opened this issue ยท 5 comments
This bug starting appearing today when I wasn't really doing anything other than looking at the map:
2x .../HandyNotes_Achievements/HandyNotes_Achievements.lua:53: attempt to index local 'rgba' (a nil value)
[string "@HandyNotes_Achievements/HandyNotes_Achievements.lua"]:53: in function RGBToColorCode' [string "@HandyNotes_Achievements/HandyNotes_Achievements.lua"]:157: in function <.../HandyNotes_Achievements/HandyNotes_Achievements.lua:118> [string "=[C]"]: ? [string "@HandyNotes/HandyNotes.lua"]:56: in function <HandyNotes/HandyNotes.lua:51> [string "@HandyNotes/HandyNotes.lua"]:166: in function
OnEnter'
[string "@HandyNotes/HandyNotes.lua"]:400: in function <HandyNotes/HandyNotes.lua:399>
@sauljaffe not really. I quit playing, and that makes testing changes very difficult.
As a compromise, I've offered to take Pull Requests, which precisely encapsulates changes, provides a place for others to debate changes, gives the project an easy way to revert changes, and (frankly) raises the bar regarding change quality (i.e., you have to be able to go through modern collaborative software development best-practices, implying you may have also done other best-practices like testing).
A short fix for this is to comment (or remove) the following block (near line 100) :
if row.faction then
local name, _, standing = C_Reputation.GetFactionDataByID(row.faction)
tooltip:AddSeparator(2, 0, 0, 0, 0)
tooltip:SetFont(GameTooltipTextSmall)
local genderSuffix = (UnitSex("player") == 3 and "_FEMALE") or ""
local reputation = _G["FACTION_STANDING_LABEL" .. standing .. genderSuffix] .. "|r"
tooltip:AddLine(name, reputation)
end
It will remove I think information on your current level on the reputation, but at least it's working back. Because it's not only the color that is causing issue, but the whole return of C_Reputation.GetFactionDataByID(row.faction) (standing is nil too)
Thanks for the information, I modified the code to implement this correction, and it's now working properly for me. Created a pull request for this if you want : #50