Weird timer error

I’m getting this and i have no idea what to do with it
Hook ‘CheckTimers’ Failed: invalid key to ‘next’


I just set up a normal timer like so
timer.Create(“name”,0.01,0,function() print(“test”) end)

I dont think you can have 0.01 in there.

You can have decimals in there, I am not sure of the lower bound tho. Try

[lua]timer.Create(“name”, 0.1, 0, function() print(“test”) end)

If that works, your timer interval was too low.

Hm, i tried it with 1 and it still failed.


Actually, fixed it using a Think hook with a delay.

That is very odd though, as I use a timer with a 0.1 interval as well. Are you sure you actually used function () print(“test”) end or did you just put that as an example?

try this:
timer.Create( “name”, 0.1, 0, function()
print( “test” )
end )[/lua]


You forgot to end the function


Nevermind, you don’t need to end the timer. So scratch my idea.


Can you show us the hook?

Well, the thing is. The timer works fine in create multiplayer/singleplayer but as soon as i lug my gamemode off to my server, it starts giving me that error
Think timer code
local var = delay + CurTime()
if var < CurTime() then
– Timer foshizzle
var = delay + CurTime()