This commit is contained in:
Sumsebrum 2022-01-12 21:04:25 +01:00
parent 1e926024ce
commit 22526c0386

View File

@ -216,11 +216,11 @@ function Gladdy:DeleteUnknownOptions(tbl, refTbl, str)
end end
for k,v in pairs(tbl) do for k,v in pairs(tbl) do
if refTbl[k] == nil then if refTbl[k] == nil then
--Gladdy:Print("SavedVariable deleted:", str .. "." .. k, "not found!") Gladdy:Debug("INFO", "SavedVariable deleted:", str .. "." .. k, "not found!")
tbl[k] = nil tbl[k] = nil
else else
if type(v) ~= type(refTbl[k]) then if type(v) ~= type(refTbl[k]) then
--Gladdy:Print("SavedVariable deleted:", str .. "." .. k, "type error!", "Expected", type(refTbl[k]), "but found", type(v)) Gladdy:Debug("INFO", "SavedVariable deleted:", str .. "." .. k, "type error!", "Expected", type(refTbl[k]), "but found", type(v))
tbl[k] = nil tbl[k] = nil
elseif type(v) == "table" then elseif type(v) == "table" then
Gladdy:DeleteUnknownOptions(v, refTbl[k], str .. "." .. k) Gladdy:DeleteUnknownOptions(v, refTbl[k], str .. "." .. k)