I'm trying to allow an item to appear on the map for 30 minutes after a creature steps on a tile, and then disappear after 30 minutes.
Error:
Both functions work outside addEvent.
I've tried a lot of variations, even making functions inside the file and they've all been fussy.
Red
LUA:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if isMonster(cid) then
addEvent(doCreateItem(11796, Position(695, 653, 9)), 1000)
addEvent(doRemoveItem(getTileItemById(Position(695, 653, 9), 11796).uid), 3000) -- 1800000 = 30 minutes. 3 seconds is for testing purposes.
end
return true
end
Error:
Code:
[16:14:54.596] [Error - MoveEvents Interface]
[16:14:54.596] data/movements/scripts/gate.lua:onStepIn
[16:14:54.596] Description:
[16:14:54.596] (luaAddEvent) Callback parameter should be a function
[16:14:54.596] [Error - MoveEvents Interface]
[16:14:54.596] data/movements/scripts/gate.lua:onStepIn
[16:14:54.596] Description:
[16:14:54.596] (luaAddEvent) Callback parameter should be a function
Both functions work outside addEvent.
I've tried a lot of variations, even making functions inside the file and they've all been fussy.
Red
Last edited: