• 0

    posted a message on AceDB-3.0: problems with new profiles
    Hi,
    I have a problem with setting up new profiles with AceDB-3.0...
    when the AddOn starts the first time, it should register some variables with
    db = LibStub("AceDB-3.0"):New("EmotionsDB", defaults, "char")
    The defaults look like this:
    local defaults = {
        char = {
            active  = true,
            firstTime   = true,
            minDelay    = 3,
            debug = true,
            emotes = {},
            words = {},
        }
    }
    
    local locale = GetLocale();
    if (locale == "deDE") then
        for k,v in pairs(deDEList) do        
            defaults.char.emotes[k] = v
        end
        for k,v in pairs(deDEWords) do        
            defaults.char.words[k] = v
        end
    else
        for k,v in pairs(enUSList) do
            defaults.char.emotes[k] = v
        end
        for k,v in pairs(enUSWords) do        
            defaults.char.words[k] = v
        end
    end
    (The tables for the xxXXList and xxXXWords are stored in a different file)

    Now, when I only enter and quit with a char in WoW, I can see/use the variables but they are not saved and there is only an empty table for the char...
    When I add or change something that should be saved, and I take a look at the saved variables, it is stored there but the default settings are still missing.

    Has somebody an idea what's wrong?
    Posted in: Ace3
  • 0

    posted a message on Dropdown-Menus and the Saved Variables
    Hi,
    I want to build a DropDown-Menu with changeable items which are stored in the Saved Variables (Using AceDB-3.0).
    When I use the OnLoad-part, i get an error, that my Saved Variables DB is nil (attempt to index global 'db' (a nil value)), but when I look at the DropDownBox all entrys are there, clickable and working.
    When I put an "if db == nil then return end;" into the OnLoad, all entrys are there, but I can't click them.

    Has somebody an idea what's wrong?
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.