View Single Post
11-01-10, 02:55 PM   #2
Xubera
A Cobalt Mageweaver
 
Xubera's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 207
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.
__________________
Chat Consolidate is the solution to any out of control trade chat. Ignore lines, throttle chat, consolidate posts!Follow the link to find out how!

▲ ▲ WoWInterface wont let me triforce >.>
  Reply With Quote