Originally Posted by Phanx
#1 - Change "t[f] = v" to "t[self] = v"
#2 - That means one of the bars you're modifying doesn't actually have 12 buttons. The whole section seems like it's probably not the best way to go about things, but I don't really feel like digging through the Blizzard actionbar code to rewrite it for you, so just do this to avoid the error:
Code:
hooksecurefunc("PetActionBar_Update", function()
for i = 1, #petButtons do
for j = 1, 12 do
local name = petButtons[i] .. j
local button = _G[name]
if button then
button:SetNormalTexture("Interface\\BUTTONS\\UI-Quickslot2")
-- all the stuff here is fine, just indent it by one more level
ColorButton(normalTexture)
else
print(name, "doesn't exist") -- you can remove this later
end
end
end
end)
|
Yet again thank you, and I will stop bugging you about my addon, I'm sure your getting irritated with all my questions and needs.
Coke