• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Item:remove() error - help please !

danick10

Intermediate OT User
Joined
Apr 11, 2009
Messages
196
Solutions
4
Reaction score
140
hello, I'm trying to remove a tree from a certain tile with tfs1.0 for 10.41
i'm using this code below v
Tile(posx, posy, posz):getTopTopItem():remove()

but I'm getting error, attemp to index a nil value! can someone solve my problem please!
thx
 
Fixed!

I used
local pos_ = {x=posx,y=posy,z=posz}
local items = Tile(pos_):getItems()
if items ~= nil then
for i = 1, #items do
items:remove()
end
end
 
Back
Top