Cell - Unit Frames

Cell - Unit Frames

148k Downloads

[Bug] LUA error with Shield Bar

Griizz opened this issue ยท 1 comments

commented

Addon Version

v1.3.8

World of Warcraft Version

Retail

Describe the bug

When i target myself with Shield active, i keep getting a lua error.

image

Steps to reproduce

Target player with shield.
Unitframes are set to orientation vertical A and Shield Bar is set to reverse fill.

BugSack

193x ...ceCell_UnitFrames/Widgets/Bars/ShieldBar.lua:137: attempt to perform arithmetic on field 'healthPercent' (a nil value)
[string "@Cell_UnitFrames/Widgets/Bars/ShieldBar.lua"]:137: in function `SetValue'
[string "@Cell_UnitFrames/Widgets/Bars/ShieldBar.lua"]:94: in function `Update'
[string "@Cell_UnitFrames/UnitFrames/OnLoad.lua"]:492: in function `UpdateWidgets'
[string "@Cell_UnitFrames/UnitFrames/OnLoad.lua"]:87: in function <Cell_UnitFrames/UnitFrames/OnLoad.lua:80>
[string "@Cell_UnitFrames/UnitFrames/OnLoad.lua"]:285: in function <Cell_UnitFrames/UnitFrames/OnLoad.lua:237>
[string "@Cell_UnitFrames/UnitFrames/OnLoad.lua"]:298: in function <Cell_UnitFrames/UnitFrames/OnLoad.lua:295>

Locals:
bar = CUF_Player_ShieldBar {
 BottomLeftCorner = Texture {
 }
 _isSelected = false
 reversePoint = "TOP"
 _owner = CUF_Player {
 }
 RightEdge = Texture {
 }
 enabled = true
 reverseFill = true
 parentHealthBarLoss = CUF_Player_HealthBarLoss {
 }
 parentHealthBar = CUF_Player_HealthBar {
 }
 _isEnabled = true
 overShieldGlow = Texture {
 }
 Center = Texture {
 }
 currentPoint = "healthBar"
 BottomEdge = Texture {
 }
 TopEdge = Texture {
 }
 id = "shieldBar"
 BottomRightCorner = Texture {
 }
 TopRightCorner = Texture {
 }
 TopLeftCorner = Texture {
 }
 backdropInfo = <table> {
 }
 showOverShield = false
 currentAnchorPoint = "TOP"
 LeftEdge = Texture {
 }
}
percent = 0.220472
maxWidth = 198.571411
barWidth = 43.779383
(*temporary) = nil
(*temporary) = 198.571411
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to perform arithmetic on field 'healthPercent' (a nil value)"
commented

Also found this error on the player frame after a loading screen with a shield active.
image

309x ...ceCell_UnitFrames/Widgets/Bars/ShieldBar.lua:137: attempt to perform arithmetic on field 'healthPercent' (a nil value)
[string "@Cell_UnitFrames/Widgets/Bars/ShieldBar.lua"]:137: in function `SetValue'
[string "@Cell_UnitFrames/Widgets/Bars/ShieldBar.lua"]:94: in function `Update'
[string "@Cell_UnitFrames/UnitFrames/OnLoad.lua"]:492: in function `UpdateWidgets'
[string "@Cell_UnitFrames/UnitFrames/OnLoad.lua"]:87: in function <Cell_UnitFrames/UnitFrames/OnLoad.lua:80>
[string "@Cell_UnitFrames/UnitFrames/OnLoad.lua"]:285: in function <Cell_UnitFrames/UnitFrames/OnLoad.lua:237>
[string "@Cell_UnitFrames/UnitFrames/OnLoad.lua"]:298: in function <Cell_UnitFrames/UnitFrames/OnLoad.lua:295>

Locals:
bar = CUF_Player_ShieldBar {
 BottomLeftCorner = Texture {
 }
 _isSelected = false
 reversePoint = "TOP"
 _owner = CUF_Player {
 }
 RightEdge = Texture {
 }
 enabled = true
 reverseFill = true
 parentHealthBarLoss = CUF_Player_HealthBarLoss {
 }
 parentHealthBar = CUF_Player_HealthBar {
 }
 _isEnabled = true
 overShieldGlow = Texture {
 }
 Center = Texture {
 }
 currentPoint = "healthBar"
 BottomEdge = Texture {
 }
 TopEdge = Texture {
 }
 id = "shieldBar"
 BottomRightCorner = Texture {
 }
 TopRightCorner = Texture {
 }
 TopLeftCorner = Texture {
 }
 backdropInfo = <table> {
 }
 showOverShield = false
 currentAnchorPoint = "TOP"
 LeftEdge = Texture {
 }
}
percent = 0.220472
maxWidth = 198.571411
barWidth = 43.779383
(*temporary) = nil
(*temporary) = 198.571411
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to perform arithmetic on field 'healthPercent' (a nil value)"