• 0

    posted a message on Issue with options table or AceDB (Not sure which).
    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:
    ["item_types"]	=	{
    	Armor	= {
    		["**"]	= {					
    			enabled			= false,
    			min_level	= 12,
    			max_level	= 1,
    			["qualities"]		= {
    				["No Quality"]		= false,
    				["Common"]		= false,
    				["Uncommon"]	= true,
    				["Rare"]					= true,
    				["Epic"]					= true,
    				["Ledgendary"]	= true,
    				["Heirloom"]		= true,
    			},
    		},
    		["Cloth"]		= {},
    	},
    	Weapon	= {
    		["**"]	= {					
    			enabled			= false,
    			min_level	= 12,
    			max_level	= 1,
    			["qualities"]		= {
    				["No Quality"]		= false,
    				["Common"]		= false,
    				["Uncommon"]	= true,
    				["Rare"]					= true,
    				["Epic"]					= true,
    				["Ledgendary"]	= true,
    				["Heirloom"]		= true,
    			},
    		},
    		["Bows"]								= {},
    	},
    },


    because it didn't work with just having it in the item_types table (If there is a better way to do that feel free to let me know, I am always open to improvements).

    Anyway, my initial problem is fixed now.

    Thanks.

    edit: Sorry for the tabbing oddness on that code block...
    Posted in: Ace3
  • 0

    posted a message on Issue with options table or AceDB (Not sure which).
    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.

    Now comes the problem:

    http://paste.wowace.com/2002/

    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.

    Thanks.

    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.
    Posted in: Ace3
  • To post a comment, please or register a new account.