1
0
mirror of https://github.com/pandorabox-io/banners.git synced 2025-01-04 23:20:36 +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)
local file = io.open(file_name, "r")
if file then
local table = core.deserialize(file:read("*all"))
local data = core.deserialize(file:read("*all"))
file:close()
if type(table) == "table" then
if table.size then
self._size = table.size
if type(data) == "table" then
if data.size then
self._size = data.size
end
for _, val in pairs(table.ele) do
for _, val in pairs(data.ele) do
self:element(val.type, val)
end
return true