forked from MineClone5/MineClone5
#346 Quickfix indexing nil savetable in doc/doc
This commit is contained in:
parent
8b2cce4399
commit
acda4deb3b
|
@ -611,11 +611,14 @@ do
|
||||||
io.close(file)
|
io.close(file)
|
||||||
if string then
|
if string then
|
||||||
local savetable = minetest.deserialize(string)
|
local savetable = minetest.deserialize(string)
|
||||||
for name, players_stored_data in pairs(savetable.players_stored_data) do
|
local players_stored_data = savetable and savetable.players_stored_data
|
||||||
doc.data.players[name] = {}
|
if players_stored_data then
|
||||||
doc.data.players[name].stored_data = players_stored_data
|
for name, players_stored_data in pairs(savetable.players_stored_data) do
|
||||||
|
doc.data.players[name] = {}
|
||||||
|
doc.data.players[name].stored_data = players_stored_data
|
||||||
|
end
|
||||||
|
minetest.log("action", "[doc] doc.mt successfully read.")
|
||||||
end
|
end
|
||||||
minetest.log("action", "[doc] doc.mt successfully read.")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue