Basically, I am making a loot filtering addon (A friend of mine and I do a lot of farming.)
Now, I have a "types" table in my profile database, it manages settings for specific type / subtypes of items (Currently Armor and Weapons). I use the ** key to define a set of default values for all the subtypes so that I don't have to copy and paste the same settings for each subtype of Armor and Weapons. (Part of the table is included with the paste link below). For each subtype, we will have a qualities option to check the qualities you want to keep, and I am using a multiselect dropdown options table to configure the true/false values on the qualities.
When I looked at the dropdown, I was expecting:
> No Quality: false (Unchecked)
> Common: false (Unchecked)
> Uncommon: true (Checked)
> Rare: true (Checked)
> Epic: true (Checked)
> Ledgendary: true (Checked)
> Heirloom: true (Checked)
but upon going in and testing it, none of them were checked (As if it's not correctly getting the true/false values of the qualities table keys.)
When I check / uncheck one of them, it sets itself fine, and saves itself in the variables fine. It's just the default values of the ones that should be checked aren't showing up checked.
Edit: Upon further testing, it appears as though it's ignoring all of the defaults. If I print out the contents of a subtype for instance, it will show the correct key names for the settings, but all the settings aren't showing up correctly. I changed min_level to 12, and it still prints out 1, even after closing the game and deleting the saved variable (Which there was nothing settings wise stored in anyway, because it was a blank slate using the defaults). So it would appear it's an issue with how I'm using the ** key, I guess.
Alright, so I feel like a complete idiot now. This is why I shouldn't code with 2 or 3 hours of sleep :/
A while ago I made a second client to see why a UI I was giving to a friend of mine didn't work (can probably see where I'm going with this, lol). Well, it turns out I coded one version of the profile.types table my regular client, and the new correct version in the copied client...
I copied over the new table, and changed it so that the ** key was in each of the types (Weapon and Armor, not the subtypes of plate/etc) like so: