View Single Post
02-25-24, 08:32 AM   #47
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,892
addon.Texts can go in the same file as addon.db as that seems to be where you're putting "data". Assuming that this file is listed in the .TOC file above the other (table.lua) file so it loads first.

Lua Code:
  1. Pets:SetText(addon.Texts.Rewards[GetLocal()] or addon.Texts.Rewards.enUS) -- enUS being the default is the GetLocale() entry doesn't exist.

Goes after you've:
Lua Code:
  1. local Pets = someframe:CreateFontString(nil, somedrawlayer, somefont)

You can't fontstring:SetText(...) on a FontString that doesn't exist.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 02-25-24 at 11:32 AM.
  Reply With Quote