View Single Post
11-14-15, 02:15 PM   #15
Soulcleaver
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 65
Originally Posted by Fizzlemizz View Post
What was the error? If the healthbar is not a StatusBar widget or the panels Onload fires before STUF is loaded that will cause errors as mentioned in Phanx's post.

It looks like the healthbar is not a statusbar but several seperate frames so my best guess would be:

Code:
hooksecurefunc(Stuf.units.target.hpbar.bar, "SetVertexColor", function(self, ...)
         self.bg:SetVertexColor(...)
    end)
This is the error from the first script

Code:
Message: [string "Targetbottom_OnLoad"]:1: hooksecurefunc(): SetStatusBarColor is not a function
Time: 11/14/15 21:15:51
Count: 1
Stack: [C]: in function `hooksecurefunc'
[string "Targetbottom_OnLoad"]:1: in function `y'
Interface\AddOns\kgPanels\kgPanels.lua:1115: in function `SetupScript'
Interface\AddOns\kgPanelsConfig\PanelHelper.lua:1330: in function <Interface\AddOns\kgPanelsConfig\PanelHelper.lua:1327>
(tail call): ?
[C]: ?
[string "safecall Dispatcher[2]"]:9: in function <[string "safecall Dispatcher[2]"]:5>
(tail call): ?
...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:799: in function <...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:614>
(tail call): ?
[C]: ?
[string "safecall Dispatcher[3]"]:9: in function <[string "safecall Dispatcher[3]"]:5>
(tail call): ?
...terface\AddOns\Masque\Libs\AceGUI-3.0\AceGUI-3.0.lua:314: in function `Fire'
...AceGUI-3.0\widgets\AceGUIWidget-MultiLineEditBox.lua:67: in function <...AceGUI-3.0\widgets\AceGUIWidget-MultiLineEditBox.lua:64>

Locals: <none>
And this is from the new script you just wrote

Code:
Message: [string "Targetbottom_OnLoad"]:2: attempt to index field 'bg' (a nil value)
Time: 11/14/15 21:17:37
Count: 2
Stack: [string "Targetbottom_OnLoad"]:2: in function <[string "Targetbottom_OnLoad"]:1>
[C]: in function `SetVertexColor'
Interface\AddOns\Stuf\bars.lua:97: in function `func'
Interface\AddOns\Stuf\core.lua:895: in function <Interface\AddOns\Stuf\core.lua:857>
Interface\AddOns\Stuf\core.lua:822: in function <Interface\AddOns\Stuf\core.lua:795>
Interface\AddOns\Stuf\core.lua:834: in function `?'
Interface\AddOns\Stuf\core.lua:110: in function <Interface\AddOns\Stuf\core.lua:109>
[C]: in function `CameraOrSelectOrMoveStop'
[string "CAMERAORSELECTORMOVE"]:4: in function <[string "CAMERAORSELECTORMOVE"]:1>

Locals: self = <unnamed> {
 sv = <function> defined @Interface\AddOns\Stuf\core.lua:718
 SetVertexColor = <function> defined =[C]:-1
 0 = <userdata>
 SetValue = <function> defined @Interface\AddOns\Stuf\core.lua:718
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field 'bg' (a nil value)"

Last edited by Soulcleaver : 11-14-15 at 02:18 PM.
  Reply With Quote