Thread Tools Display Modes
05/13/15, 06:52 PM   #1
Phinix
 
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 186
Saved variable won't initialize properly.

First time I have seen this.

In my manifest I have ## SavedVariables: MyAddonName just like every other addon I have made. Then in my OnAddonLoaded block I have:

Code:
	MyAddonName.SavedVariables = ZO_SavedVars:New(MyAddonName.Name, 1, nil, Defaults)
	MyAddonName.AccountSavedVariables = ZO_SavedVars:NewAccountWide(MyAddonName.Name, 1, nil, Progress)
Like every other addon I have made.

For some reason, both the character specific and account wide variables fail to initialize and the saved variables file is populated with "default" for each, with an extra field:

["GetInterfaceForCharacter"] = nil, -- invalid value type [function] used

Anyone know why or what it means?
  Reply With Quote
05/13/15, 07:06 PM   #2
Phinix
 
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 186
Figured it out.

Apparently, you can't name your global namespace the same as your addon folder/saved variables prefix.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Saved variable won't initialize properly.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off