Fixed bug.

bad argument #1 to 'get_node' (table expected, got nil)
This commit is contained in:
Splizard 2013-02-21 12:39:25 +13:00
parent 45c9a7902e
commit 3253423dc6

View File

@ -117,10 +117,10 @@ function random_chests.refill(i)
if chests[i] then if chests[i] then
local n = env:get_node(chests[i]).name local n = env:get_node(chests[i]).name
if (not n:match("default:chest")) and n ~= "ignore" then if (not n:match("default:chest")) and n ~= "ignore" then
table.remove(chests,i)
print("chest missing! found:") print("chest missing! found:")
print(env:get_node(chests[i]).name) print(env:get_node(chests[i]).name)
print("instead") print("instead")
table.remove(chests,i)
else else
fill_chest(chests[i]) fill_chest(chests[i])
end end