• 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 TFS 1.3 remove object on target.y offset

MrVilhelm

Mafia Penguin
Joined
Dec 11, 2020
Messages
141
Solutions
1
Reaction score
113
Location
Sweden
GitHub
MrVilhelm
Hiii me again, Im stuck at some coding again, and since you guys always help me out and teach me a lot of new stuff for every post I do, I will ask you for guidens! ^^

So basically I want to remove an item on my target offset. So I tried creating a variable like this :
Lua:
local activeTileGrid1 = Tile(toPosition.x, toPosition.y + 10, toPosition.z)

activeTileGrid1.remove(2113)
But this gave me an error like this "attempt to call method 'remove' (a nil value)"

target.remove(2113) worked perfectly tho but anywho now I need you guys!

Thanks in beforehand! ❤️
Post automatically merged:

SOLVED!

I tested around a bit and came up with :

Lua:
    local targetBoatGrid1 = {
        x = toPosition.x,
        y = toPosition.y + 10,
        z = toPosition.z
    }
    local targetPos = Tile(targetBoatGrid1):getItemById(2113)

        if activeTileGrid1:getItemById(boat) then
            targetPos:remove(2113)
Worked like a charm!
 
Last edited:
Back
Top