If playerRole is still a table then no.
Whatever is on the left side has to be able to equate to whatever is on the right.
Taking a look at the library,
Code:
local playerRole = LibClassicSpecs.Role
Just returns a table of
Lua Code:
local Role = {
Damager = "DAMAGER",
Tank = "TANK",
Healer = "HEALER"
}
playerRole should be something like a return from GetSpecializationInfo for the characters current classs/spec. ie. a string with "HEALER", "TANK" etc.
Lua Code:
local playerRole = select(6, GetSpecializationInfo(xxx))
Then where you're using playeRole it can just be
Lua Code:
if playerRole == nil then
--xxx Text:SetText(hexa.."No Stats"..hexb)
else
if playerRole == "TANK" then
UpdateTank(self)
elseif playerRole == "HEALER" then
UpdateCaster(self)
elseif playerRole == "DAMAGER" then
UpdateDamager(self)
end
end