• 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!

Bug Stack items

myalitth

New Member
Joined
Jan 13, 2013
Messages
69
Reaction score
3
Anyone know how to fix a bug that affects many 1.2 and lower servers.
The bug comes down to put many items at same place, and cause server crash the server save or clean.

Something like putting a maximum limit to 10 items per tile, either on pz area (houses, temples)


Thank you!
 
Solution
events/player.lua
onMoveItem
Code:
local tile = toPosition:getTile()
if tile and tile:getItemCount() >= 6 then -- checks if tile
    self:sendCancelMessage("Sorry, not possible.")
    return false
end
events/player.lua
onMoveItem
Code:
local tile = toPosition:getTile()
if tile and tile:getItemCount() >= 6 then -- checks if tile
    self:sendCancelMessage("Sorry, not possible.")
    return false
end
 
Last edited:
Solution
local tile = Tile(toPosition)
on tfs 1.2
and

if Tile(toPosition):getItemCount() >= 6 then

The 6 is the Max item on the tiles.
if you want to set to 20, only change that number.
 
Back
Top