Doggynub
LUA / C++
- Joined
- Sep 28, 2008
- Messages
- 2,541
- Reaction score
- 186
i have this
and i get thins , though the item is remove , seems like it is excuting function twice or what lol :
Lua:
function onRemoveItem(moveItem, tileItem, position, cid)
local p = getThingPosition(moveItem.uid)
local f = moveItem.uid
if not isInRange(p,frompos,topos) then
doRemoveItem(getTileItemById(getThingPosition(f),moveItem.itemid).uid)
end
return true
end
and i get thins , though the item is remove , seems like it is excuting function twice or what lol :
Code:
[22:50:12.131] [Error - MoveEvents Interface]
[22:50:12.132] data/movements/scripts/tic.lua:onRemoveItem
[22:50:12.133] Description:
[22:50:12.135] data/lib/032-position.lua:2: attempt to index local 'position' (a
boolean value)
[22:50:12.136] stack traceback:
[22:50:12.137] data/lib/032-position.lua:2: in function 'isInRange'
[22:50:12.139] data/movements/scripts/tic.lua:24: in function <data/movements/s
cripts/tic.lua:20>
[22:50:12.140] [C]: in function 'doRemoveItem'
[22:50:12.141] data/movements/scripts/tic.lua:26: in function <data/movements/s
cripts/tic.lua:20>