1
0
mirror of https://github.com/pandorabox-io/banners.git synced 2025-01-06 16:10:32 +01:00

fix shaddowing global table

This commit is contained in:
Luke aka SwissalpS 2024-11-28 10:17:03 +01:00
parent 2175d77186
commit 5cf1946064

View File

@ -146,13 +146,13 @@ function smartfs._makeState_(form, player, params, is_inv)
load = function(self, file_name) load = function(self, file_name)
local file = io.open(file_name, "r") local file = io.open(file_name, "r")
if file then if file then
local table = core.deserialize(file:read("*all")) local data = core.deserialize(file:read("*all"))
file:close() file:close()
if type(table) == "table" then if type(data) == "table" then
if table.size then if data.size then
self._size = table.size self._size = data.size
end end
for _, val in pairs(table.ele) do for _, val in pairs(data.ele) do
self:element(val.type, val) self:element(val.type, val)
end end
return true return true