Thread Tools Display Modes
08/07/14, 12:22 AM   #1
Alisu
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 3
ZO_SavedVars not creating file

I have double and triple checked the spelling, copypasted it from other addons where it's working. Checked and rechecked I have the proper ## SavedVariables Line in my .txt and still, the addon I'm writing simply does not even create the file. (I even removed the whole SavedVars folder and let the game to recreate it in case of some writing issue. It did it beatifully for each and every other addon). I'm running out of ideas.
  Reply With Quote
08/07/14, 02:52 AM   #2
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Make sure your manifest file's basename matches your addon folder name.

Also: SavedVars must be created in the EVENT_ADD_ON_LOADED function event in order for the settings file to properly save.

It's in the wiki in quick questions, but I think I'll add this note to the manifest page, too
  Reply With Quote
08/07/14, 03:11 AM   #3
Alisu
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 3
I have it in the EVENT ADDON LOADED , which is the way it works in other addons I have done. I even took one trial to create it later via chat command to see if it was too early in addon loaded. I'll have to re-recheck the folder naming when I get home. I was also thinking, could it be issue of wrong kind of line endings in the .txt. Also the function seems to work otherwise since a table it returns works further in the code, without causing nil accessing problems.. The file just doesn't get created.
  Reply With Quote
08/07/14, 03:24 AM   #4
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by Alisu View Post
I was also thinking, could it be issue of wrong kind of line endings in the .txt.
No. I only use Unix line endings (LF), not Windows (CR LF), and ESO is just fine with that.
  Reply With Quote
08/07/14, 04:06 AM   #5
unLeashed3k
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 33
Perhaps a BOM if you're saving in unicode?
  Reply With Quote
08/07/14, 10:05 AM   #6
Alisu
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 3
I recreated the .txt file from the beginning, and now it works. The only difference I seem to have is that now there is linebreak in the end of the file, while earlier it ended in the line that contained the .lua file to be loaded... No idea if that was the problem, or if there was some thing else mystically broken.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » ZO_SavedVars not creating file


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