View Single Post
04-26-14, 08:41 AM   #45
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Phanx View Post
#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
  Reply With Quote