MrVilhelm
Mafia Penguin
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 :
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!
SOLVED!
I tested around a bit and came up with :
Worked like a charm!
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)
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)
Last edited: