private static method inventoryCheck takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer id = GetHandleId(t)
local unit u = unitItemCheck.unit[id]
local item itm = unitItemCheck.item[-1 * id]
set unitHasItem.boolean[GetHandleId(itm)] = true
if UnitHasItem( u, itm) then
set ItemTable[GetHandleId(itm)].boolean[0] = false
endif
call unitItemCheck.remove(id)
call unitItemCheck.remove(-1 * id)
call DestroyTimer(t)
set t = null
endmethod
And you forgot to null local u
Have a good day!