All pastes #112274 Raw Edit

Anonymous

public lua v1 · immutable
·published 2006-08-02 20:15 UTC
rendered paste body
in 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