well make sure its saving correctly
in your toc you need ##SavedVariables: or ##SavedVariablesPerCharacter:
and you dont have to save them, they are just active
you could have a addon that said
Code:
if event == "VARIABLES_LOADED" then
myAddonDB.timesLoggedIn = myAddonDB.timesLoggedIn + 1
end
and be done with it.
also make sure that you know that
Code:
local table1, table2 = {1,2,3}, {4,5,6}
table1 = table2
wipe(table2)
for k,v in ipairs(table1) do
print(k,v)
end
will output noting because when you set a table equal to another table, you dont add the values or set the values equal to each other, you save the reference pointer to the table.
Another thing is that your saved variables dont have to be tables, you could have MyAddonTimesLogged, MyAddonTimesDied and just have 2 numeric values.