Anonymous
public lua v1 · immutablein YourAddon:Initialize(), add these lines self:RegisterDB("aUFDB") self:RegisterDefaults('profile', aUF_DEFAULT_OPTIONS)where aUFDB is your savedvariable from the TOC, and aUF_DEFAULT_OPTIONS is a table with the default options in it.#### aUF_DEFAULT_OPTIONS = {hat = true}now your options is in the table "self.db.profile".#### function YourAddon:DoSomething()#### if self.db.profile.hat == true then#### -- do something#### end#### end