Hi,
I wonder what the true and exact limits of saving data into saved variables are.
I played a bit around with a simple setting where I directly accessed the Global Variable defined in the Manifest file.
I managed to create a savedvar with 2.7 MB that gets corrupted upon loading by simply doing the following:
Lua Code:
CombatMetricsFightData_Save = {}
for i = 1, entries do
CombatMetricsFightData_Save[i] = true
end
if entries is bigger than 131072 the last and first entry become weird
Lua Code:
[true] = true,
...
["CombatMetricsFightData_Save"] = true,
it uses its own handle and value as table key ...
This usually happens on load, when I check the file before loading I can see in a texteditor that everything is still fine.
If I save longer values e.g.
Lua Code:
CombatMetricsFightData_Save[i] = tostring(math.random())
then the max number decreases to ~99.5k
Lua Code:
CombatMetricsFightData_Save[i] = {i, "ABC"..i, math.random()}
can take about 52k
then again
Lua Code:
CombatMetricsFightData_Save[i] = {1,2,3,4,5,6,7,8,9,10}
or a fixed string with 999 chars allow for 131k values again (in the latter case the file is 133 MB big, so its not the filesize...).
I would like to somehow make sure that I don't create corrupted saved variables (but still be able to save a lot of data).
It somehow feels like a bug to me, but it might be something that cannot be changed.
So if the restriction cannot be lifted, I at least would like to have a way to tell if my file will be fine or not.