View Single Post
12-10-17, 10:08 AM   #6
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
What Seerah said. AceDB does not write anything to the SV file except for the profile keys, unless something has been changed by the user. If the value in the defaults table is the same as the user settings, there is no change, therefore nothing is written into the saved variables file.

Rilgamon, what Sweetsour wrote in his .toc is correct for AceDB, although you can use saved variables per character as well if you wanted. However, I always felt that was unnecessary since AceDB can use any combination of global, profile, char, faction, and a few other variants.

I do have one suggestion to make about line 20. Change it to include the true argument at the end. This will create a profile called Default when loaded into the game.
Lua Code:
  1. self.db = LibStub("AceDB-3.0"):New("SCritsDB", defaults, true)

Last edited by myrroddin : 12-10-17 at 10:11 AM. Reason: advice for line 20
  Reply With Quote