hello everyone, i have this problem which is the first time it happened to me
when i use this code:
local timers = { }
local created = false
addCommandHandler ("cre",
function ()
if created == true then return end
local x,y,z = getElementPosition (localPlayer)
local obj = createObject (3095, x,y,z-1)
created = true
local timer = setTimer (function ()
moveObject (obj, 2000, x,y,z+10)
end, 1000, 5)
table.insert (timers, timer)
end
)
addEventHandler ("onClientPlayerWasted", localPlayer,
function ()
if created == true then
for _,v in ipairs (timers) do
if isTimer (v) then
killTimer (v)
table.remove (timers, v)
end
end
end
end
)
this problem shows up to me:
bad argument #2 to 'remove' (number expected, got userdata)
i don't know what is the problem