View Single Post
04-26-14, 08:20 AM   #44
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
#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)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote