View Single Post
12-17-12, 04:04 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
This literally does nothing:

Code:
for name in pairs(RemGankDB) do
    RemGankDB[name] = RemGankDB[name]
end
It just spends CPU cycles going through the database and saying "set this key to the same value it alread has". At the end of the loop absolutely nothing has actually been done.

If your database only contains name=data pairs, and not any other settings, then this is all the initialization you need to make sure it is defined as a table the first time your addon runs:

Code:
RemGankDB = RemGankDB or {}
Then, when adding a name, you will need to keep this check:

Code:
RemGankDB[name] = RemGankDB[name] or {}
It would not make sense to do anything with names at load because you do not know, in advance, the names of players who are going to kill you.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote