View Single Post
12-14-17, 11:25 AM   #1
Smallinger
A Deviate Faerie Dragon
 
Smallinger's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 18
AceConfig OptionsTable Radio Help

Hello, i working my first time with AceConfig Options Table and AceDB,

if i press on one of the radio i got this error.
Code:
attempt to index field 'repairMode' (a string value)
i have a table with follow information
Code:
local repairModeList = {
	["1"] = "Own gold",
	["2"] = "Guild bank",
}
i have under RegusterDefaults a Variable with the name
Code:
self.db:RegisterDefaults({
	char = {
		autoRepair = true,
		printRepairGold = true,
		repairMode = "1",
	}
})
and in the Table for AceConfig OptionsTable a radio like this.

Code:
repairMode = {
	order	= 17,
	type 	= "select",
	name    = "Repair mode",
	desc    = "",
	style	= "radio",
	values 	= repairModeList,
	get   	= function(key) return self.db.char.repairMode[key.arg] end,
	set   	= function(key, value) self.db.char.repairMode[key.arg] = value end,
},
i hope anyone can help me..
  Reply With Quote