Open Pandaabear0 opened 3 months ago
+1 Need a fix for TWW.
Oh no. I need this to properly differentiate between rogues and hunters.
I managed to fix the "!ClassColors/ClassColors.lua:378: attempt to call global 'InterfaceOptions_AddCategory' (a nil value) [string "@!ClassColors/ClassColors.lua"]:378: in function <!ClassColors/ClassColors.lua:119>" error myself.
This post references what changes have to be made with the prepatch update.
Basically you need to
InterfaceOptions_AddCategory(self);
category, layout = Settings.RegisterCanvasLayoutCategory(self, panel.name, self.name); category.ID = self.name Settings.RegisterAddOnCategory(category);
InterfaceOptionsFrame_OpenToCategory(self)
Settings.OpenToCategory(category.ID)
Edit: Updated with proper variable name.
I managed to fix the "!ClassColors/ClassColors.lua:378: attempt to call global 'InterfaceOptions_AddCategory' (a nil value) [string "@!ClassColors/ClassColors.lua"]:378: in function <!ClassColors/ClassColors.lua:119>" error myself.
This post references what changes have to be made with the prepatch update.
Basically you need to
- open ClassColors.lua
- ctrl-F for
InterfaceOptions_AddCategory(panel);
- replace that line with
category, layout = Settings.RegisterCanvasLayoutCategory(panel, panel.name, panel.name); category.ID = panel.name Settings.RegisterAddOnCategory(category);
- ctrl-F for
InterfaceOptionsFrame_OpenToCategory(self)
- replace the two lines of that (no idea why there are two) with
Settings.OpenToCategory(category.ID)
Hey Gotex! Thanks for helping with a potential fix! However, I don't seem to be able to find "InterfaceOptions_AddCategory(panel);", only "InterfaceOptions_AddCategory(self)"
Changing that didn't do anything. I also tried reading thru the forum post a bit and see if I could somehow understand the problem. My coding knowledge is limited. I tried adding "local category, layout" at the top of the lua file, as someone suggested. That didn't do anything either. I tried replacing the "InterfaceOptions_AddCategory(self)" instead of the suggested "InterfaceOptions_AddCategory(panel);", but as expected that didn't rly do anything either.
So a friend who codes helped me fix the addon.
First off:
At the top, add: local category, layout
, I added it on line 10.
Then scroll down to InterfaceOptions_AddCategory(self)
and replace it with:
category, layout = Settings.RegisterCanvasLayoutCategory(f, f.name, f.name);
category.ID = f.name
Settings.RegisterAddOnCategory(category);
On lines: 379, 380, 381 respectively.
Then change InterfaceOptionsFrame_OpenToCategory(self)
with:
Settings.OpenToCategory(category.ID)
(yes, both lines).
(Should be lines 387 and 388 if you followed the previous steps)
This enabled the addon for me, color changing works etc. I hope it works for you!
I did you fix, but when i choose color in colorpicker, it does not change it on Player Unitframe (I use ElvUI)
Hey Gotex! Thanks for helping with a potential fix! However, I don't seem to be able to find "InterfaceOptions_AddCategory(panel);", only "InterfaceOptions_AddCategory(self)"
Oops! The addon creator named the variable self, not panel like the example from the forum post. I forgot to change that when copying it over from the article to my comment but I'm glad you and your friend figured it out. I edited my comment with that change. Declaring the variables at the top didn't seem to be required so I didn't bother since it's working, but I probably should if I care about coding ethics.
I did you fix, but when i choose color in colorpicker, it does not change it on Player Unitframe (I use ElvUI)
I didn't even check if I could change the settings, but you're right. The change just removes the error it throws and puts the settings back in the menu but doesn't save any changes you actually try to make. That is unfortunate.
Ye, my fix doesn't seem to actually save any changes either. It does work as intended, just no changes can be made in-game.
But, I guess as a temporary fix you can color in the ClassColor.lua inside your WTF > Account > -AccountName#X- > SavedVariables.
I guess colorpicker in this addon is broken.
I wanted to share this script to run ingame to change colors: /run ClassColorsDB.DRUID.r = 1 ClassColorsDB.DRUID.g = 0.42 ClassColorsDB.DRUID.b = 0.18
Then /reload
Seems the addon is broken again. Any chance for a fix?
@supersonic42 Patch 11.0.2 changed GetAddOnMetadata
to C_AddOns.GetAddOnMetadata
.
So all you have to do is search for GetAddOnMetadata
in Localization.lua (line 14 and 15) and in ClassColors.lua (line 21) and change it to C_AddOns.GetAddOnMetadata
@supersonic42 Patch 11.0.2 changed
GetAddOnMetadata
toC_AddOns.GetAddOnMetadata
. So all you have to do is search forGetAddOnMetadata
in Localization.lua (line 14 and 15) and in ClassColors.lua (line 21) and change it toC_AddOns.GetAddOnMetadata
Seems like that still left another error " Interface/AddOns/!ClassColors/Localization.lua:17: attempt to call global 'FillLocalizedClassList' (a nil value)"
Any fix for this?
EDIT: I just removed that line kekw
@supersonic42 Patch 11.0.2 changed
GetAddOnMetadata
toC_AddOns.GetAddOnMetadata
. So all you have to do is search forGetAddOnMetadata
in Localization.lua (line 14 and 15) and in ClassColors.lua (line 21) and change it toC_AddOns.GetAddOnMetadata
Seems like that still left another error " Interface/AddOns/!ClassColors/Localization.lua:17: attempt to call global 'FillLocalizedClassList' (a nil value)"
Any fix for this?
EDIT: I just removed that line kekw
Yes, i also got this error and commented out this line. Seems the addon works fine without it.
Seems like that still left another error " Interface/AddOns/!ClassColors/Localization.lua:17: attempt to call global 'FillLocalizedClassList' (a nil value)"
Any fix for this?
The patch changed FillLocalizedClassList
to LocalizedClassList
.
Anone know a fix for colorpicker in game? Doesnt seem to save.
Hey, since this addon hasn't been updated in a while, I made my own version. Check it out here: https://www.curseforge.com/wow/addons/colortools-class-colors
Hey! Any chance you will update this for The War Within? It's completely broken.
Or maybe let me know how I could possible do it myself.