The error is telling you that you're trying to write to a table that doesn't exist. You need to create a table before you can store entries in it.
Originally Posted by _Max_Cavalera_
Code:
if not addonDB["chars"][realm .. " " .. name] then
addonDB["chars"][realm .. " " .. name]["profile"] = "default"
|
Assuming you have the
addonDB table defined as you posted earlier, you need to create a table at
[realm .. " " .. name] before you can store anything at
["profile"].