View Single Post
01/25/16, 06:32 PM   #11
Terrillyn
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 24
I still cant get these accountwide settings to work the way I want.

there seems to be something weird going on with the references, if I try to change a an accountwide setting via console (SimpleXPBar.AWSV.textbar.text = "Hello World") or even using a function, none of the settings are updated in the live tables or saved tables, its making it utterly confusing. I have also tried using coolmodi's deepcopy and its not working, I've also tried this:
Lua Code:
  1. function SVOverwrite(src, dst)
  2.     for k,v in pairs(src) do
  3.         d(type(v) .. ": " .. k)
  4.         if type(v) == "table" then
  5.             SVOverwrite(v, dst[k])
  6.         elseif type(v) == "function" then
  7.         else
  8.             dst[k] = v
  9.         end
  10.     end
  11. end
again not working;
All I want to do is overwrite the values in one SavedVars with another while still letting them both save seperately, no references just values, this is driving me crazy, what am I doing wrong?
  Reply With Quote