Originally Posted by Game92
When i actually remove the check it give errors for some reason
Lua Code:
...nterface\AddOns\AftermathhUI\Modules\Auras\Auras.lua:180: attempt to index local 'ABuffFrame' (a nil value)
|
1. When you post an error message, please also post the entire file where the error is originating. Without knowing what line 180 is, that error isn't very helpful.
2. As a general tip, it can be helpful to add some
print statements to let you see when things are happening and what data the API is giving you. For example:
Code:
hooksecurefunc("AuraButton_Update", function(self, index, filter)
local ABuffFrame = _G[self..index]
print("AuraButton_Update", self, index, filter, ABuffFrame)
On second look, it looks like AuraButton_Update
can actually be called for buttons that don't exist, but it would be better (easier to read at a glance) to do the check like this:
Code:
hooksecurefunc("AuraButton_Update", function(self, index, filter)
local ABuffFrame = _G[self..index]
if not ABuffFrame then return end
If that's not what line 180 is, please post the rest of the code.