stefbox99
New Member
- Joined
- Jun 30, 2020
- Messages
- 2
- Reaction score
- 0
Lua:
startPos = Position(1064, 853, 7)
endPos = Position(1088, 875, 7)
function cleanTiles(startPos, endPos)
for x = startPos.x, endPos.x do
for y = startPos.y, endPos.y do
for z = startPos.z, endPos.z do
local item = Tile(Position(x, y, z)):getItems()
if item ~= nil then
item:remove()
Position(x, y, z):sendMagicEffect(3)
end
end
end
end
end
Above is my script, and get the following "attempt to call method 'remove' (a nil value)", all I know getItems() returns a table.
i'm kinda a beginner on scripting. Any advice would be appreciated.