View Single Post
01/29/16, 10:13 PM   #30
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by Terrillyn View Post
It doesn't seem like you read any of the posts here:
  • I didn't need to copy the metatable, I needed to copy through the metatable without effecting it, this is solved.
  • SimpleXPBar.accountwide_settings hasn't been used since I started this thread.
  • Also I just checked the settings in _G and they seem to be out-of-date as soon as you change a setting, possibly updated at a later time, which makes copying from them a non-option.

I appreciate any help I got, thank you all, but how do I mark this thread solved?
Your right I didn't read any of the posts, I didn't need to. I read the question (the original post), I knew how to do it, & I posted it.

From your post it appeared you wanted to create a toggle that swaps between character & account wide settings and you wanted to copy the current acccountwide saved vars to the character saved vars to sync them. If something else was added later or changed your right I missed it.

I understand you wanted to copy through the metatable. I just went around it, all of that metadata is stored in _G which is what I copied.

_G is up-to-date when you change settings, that code works.
I'm guessing you had zgoo open and you were checking your SimpleXPBar.CurSV table after the swap/copy which would show the settings were out of date because zgoo would still be referencing the old table from before the swap. You can't just open & close the saved var table, you have to close zgoo & re-run /zgoo xxx after the swap for it to show the updated settings.

I'm glad you got it to work though.
  Reply With Quote