View Single Post
09-05-23, 12:46 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,897
I get the spec just fine.

With
Code:
 if db.stats then
Your Update function is:
Lua Code:
  1. local function Update(self, t)
  2.                 if playerRole == nil then
  3.                     Text:SetText(hexa.."No Stats"..hexb)
  4.                 else
  5.                     if playerRole == playerRole.Tank then
  6.                         UpdateTank(self)
  7.                     elseif playerRole == playerRole.Healer then
  8.                         UpdateCaster(self)
  9.                     elseif playerRole == playerRole.Damager then
  10.                         UpdateDamager(self)
  11.                     end
  12.                 end
  13.             end
playerRole appeares to be a table so it can't be both not nil and == a sub-key of itself
Code:
if playerRole == playerRole.Tank then
is essentially
Code:
if theTable == theTable.Tank then
You need to re evaluate
Lua Code:
  1. local playerRole = LibClassicSpecs.Role
and maybe add an other variable to hold the actual characters role name string.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote