Thread Tools Display Modes
04/02/16, 06:14 AM   #1
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
Possible SavedVariables bug

The problem:
The SavedVariables table which I registered in the addon's .txt file isn't saved for some users.

Some more informations:
The sub-addon HarvestMapImport of HarvestMap has the following line in its .txt file:
## SavedVariables: HarvestImport_SavedVars
The following line is called in the EVENT_ADD_ON_LOADED callback:
Lua Code:
  1. HarvestImport.savedVars = ZO_SavedVars:New("HarvestImport_SavedVars", 1)
And when using the export feature the following lines are called:
Lua Code:
  1. HarvestImport_SavedVars["Default"] = {["@exporteddata"]= {["$AccountWide"] = {["nodes"] = data}}}
  2. ReloadUI("ingame")
The export feature works fine for me. If I delete the HarvestMapImport.lua file in the SavedVariables folder and then log in with a character and use the export feature, I get a loading screen and in the SavedVariables folder a new HarvestMapImport.lua file appears which contains the exported data.
However for some players this doesn't work:
http://www.esoui.com/portal.php?id=1...bug&bugid=1704
Also, the export function of harvestmap-import does not save a the file /SavedVariables/HarvestImport.lua but does reload the ui. Tested about 5 times during the ui reloads above.
Given that the UI reloads, the previous line where data is put into the HarvestImport_SavedVars table is executed without an error/crash.
For some reason however the game doesn't save the HarvestImport_SavedVars table.
I first assumed a permission conflict, like the game not being able to write into the SavedVariables folder, however HarvestMap's addon settings were able to be saved in SavedVariables/HarvestMap.lua.

Any idea what's going on?
  Reply With Quote
04/03/16, 08:54 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
There are a few things you can ask them in order to find out what is happening.
  • Which OS do they use?
  • Is there enough disk space?
  • Does the game even create the file?
    • If so, does it overwrite the content of the file if the user adds something with a text editor while the game is running?
    • If not, does it work when they create the file manually while the game is not running?
  • Does it work if you rename the variable?
I recently had the issue that eso wouldn't save stuff in one file because I had a file handle open on it in a node.js app. Maybe a virus scanner is doing something similar? You could ask them to use the Windows Resource Monitor and search for the filename in the CPU tabs ("Search Handles") to see if some other program has it opened.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Possible SavedVariables bug


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