As Xikini said return value can only be true or false.
Here is my take.
local ec = EventCallback
ec.onMoveItem = function(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)
local tile = Tile(toPosition)
if tile and tile:hasFlag(TILESTATE_DEPOT) and...