Hey guys. I'm trying to do a few things with the health text in this layout, but I'm not having any luck. I want the player, target, and focus frames to have a larger font size than the rest of the layout, but when I add a simple if statement to make the change, the addon doesn't load anymore. I've attached the original code, and the code with my modifications. What am I doing wrong? Is this even possible?
Thanks!
Original
Code:
local health = ns.CreateStatusBar(self, 16, "RIGHT", true)
health:SetPoint("TOPLEFT", self, "TOPLEFT", 1, -1)
health:SetPoint("TOPRIGHT", self, "TOPRIGHT", -1, -1)
health:SetPoint("BOTTOM", self, "BOTTOM", 0, 1)
self.Health = health
Modified
Code:
if unit == "player" or unit == "focus" or unit == "target" then
local health = ns.CreateStatusBar(self, 16, "RIGHT", true)
else
local health = ns.CreateStatusBar(self, 8, "RIGHT", true)
end
health:SetPoint("TOPLEFT", self, "TOPLEFT", 1, -1)
health:SetPoint("TOPRIGHT", self, "TOPRIGHT", -1, -1)
health:SetPoint("BOTTOM", self, "BOTTOM", 0, 1)
self.Health = health
Thanks for the help!