ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   ZO_SavedVars not creating file (https://www.esoui.com/forums/showthread.php?t=2074)

Alisu 08/07/14 12:22 AM

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.

merlight 08/07/14 02:52 AM

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 :)

Alisu 08/07/14 03:11 AM

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.

merlight 08/07/14 03:24 AM

Quote:

Originally Posted by Alisu (Post 11248)
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.

unLeashed3k 08/07/14 04:06 AM

Perhaps a BOM if you're saving in unicode?

Alisu 08/07/14 10:05 AM

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.


All times are GMT -6. The time now is 07:16 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI