diff --git a/pos.lua b/pos.lua index c24c3d6..aa8aba5 100644 --- a/pos.lua +++ b/pos.lua @@ -193,7 +193,8 @@ function areas:setPos1(name, pos) end if old_pos then - for object in core.objects_inside_radius(old_pos, 0.01) do + -- TODO: use `core.objects_inside_radius` after Luanti 5.10.0 is well established. + for _, object in ipairs(core.get_objects_inside_radius(old_pos, 0.01)) do local luaentity = object:get_luaentity() if luaentity and luaentity.name == "areas:pos1" and luaentity.player == name then object:remove() @@ -216,7 +217,8 @@ function areas:setPos2(name, pos) end if old_pos then - for object in core.objects_inside_radius(old_pos, 0.01) do + -- TODO: use `core.objects_inside_radius` after Luanti 5.10.0 is well established. + for _, object in ipairs(core.get_objects_inside_radius(old_pos, 0.01)) do local luaentity = object:get_luaentity() if luaentity and luaentity.name == "areas:pos2" and luaentity.player == name then object:remove()