• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Clean Specific Area Bug

skywalker16

New Member
Joined
Nov 5, 2008
Messages
250
Reaction score
1
Location
Switzerland
I am trying to make an Area Clean on these cordinates but always receive lots of error messages, whether a tile is not used on the map ... (when no groundtile has been set on a cordinate)

Is there any way to make it like validate, whether there is a ground tile or not?

Error
[Error - GlobalEvent Interface]
In a time event called from:
data/globalevents/test_clean.lua:eek:nTink
Description:
(luaDoCleanTile) Tile not found



Relevant Script Part
local CleanArenaArea = {
{x=1000, y=1000, z=6}, -- nw corner
{x=1020, y=1020, z=8} -- se corner
}


for x = (CleanArenaArea)[1].x, (CleanArenaArea)[2].x do
for y = (CleanArenaArea)[1].y, (CleanArenaArea)[2].y do
for z = (CleanArenaArea)[1].z, (CleanArenaArea)[2].z do
local clean_pos = {x = x, y = y, z = z}
if isCleanAbleArea(clean_pos) == true then
doCleanTile(clean_pos, false)
end
end
end
end
 
Back
Top Bottom