Raven

2M Downloads

Cata Classic - SetTextColor error

theoriginalmre opened this issue ยท 5 comments

commented

Are you able to fix this weird error for me? Whenever I get a debuff (eg bandage myself to get the "Recently Bandaged" debuff), Raven breaks and gives me this error.


1x bad argument #2 to '?' (Usage: self:SetTextColor(color [, a]))
[string "=[C]"]: in function SetTextColor' [string "@Raven/Nest.lua"]:1777: in function <Raven/Nest.lua:1550> [string "@Raven/Nest.lua"]:2760: in function Nest_Update'
[string "@Raven/Main.lua"]:1288: in function `Update'
[string "@Raven/Main.lua"]:953: in function <Raven/Main.lua:949>

Locals:
(*temporary) = "bad argument #2 to '?' (Usage: self:SetTextColor(color [, a]))"

I've had this for months and months, and get around it by deleting line 1777 in Nest.lua, which fixes everything, but I don't know why it happens in the first place.

commented

That's usually caused by a corrupted profile. If you can upload yours I could see if I can correct the problem.

commented

Just to be clear, your profile is the Raven.lua file located in:
...\World of Warcraft\_classic_\WTF\Account\YOUR_ACCOUNT_NAME_HERE\SavedVariables

commented

Sure, can do!

Some background info... Colors are defined with 4 keys argb; alpha (or transparency), red, green and blue. The error you're seeing is caused by colors missing one or more keys.

What you'll want to do is search through the file for "iconColor" and "labelColor", and for any entry missing a key, add the key with a value of 1.

So, as an example. The following:

["iconColor"] = {
    ["g"] = 0.945098039215686,
    ["r"] = 0.949019607843137,
},

Would become:

["iconColor"] = {
    ["a"] = 1,
    ["b"] = 1,
    ["g"] = 0.945098039215686,
    ["r"] = 0.949019607843137,
},

The order of keys doesn't matter, just that the entries are there.

commented

Thanks!
This may take a while lol. I may go thru the profiles in game first and delete all the old crap im not using.

commented

That could speed things up ๐Ÿ‘Œ

The amount of problems should be limited as long as you kept your addons up-to-date. The corrupt data was caused by a bug in a dependency during the launch of Dragonflight, and to my knowledge wasn't active very long.