To keep my server stable while working out bugs with timers, I tried to revert to the old timer.lua, but ran into this issue:
[code]ERROR: Hook 'CheckTimers' Failed: lua/includes/modules/timer.lua:191: attempt to call global 'unpack' (a nil value)
Removing Hook 'CheckTimers'[/code]
I checked using lua_run, and unpack still exists. Any idea why this piece of code failed?
Don't revert timer.lua, fix the code instead.
You are not going to get much support if you wish a outdated codebase.
[QUOTE=infinitywrai;38232092]To keep my server stable while working out bugs with timers, I tried to revert to the old timer.lua, but ran into this issue:
[code]ERROR: Hook 'CheckTimers' Failed: lua/includes/modules/timer.lua:191: attempt to call global 'unpack' (a nil value)
Removing Hook 'CheckTimers'[/code]
I checked using lua_run, and unpack still exists. Any idea why this piece of code failed?[/QUOTE]
timer.lua is a module, you have to localise any globals/libraries needed before the call to module( "timer" )
Add local unpack = unpack to the top of the file.
[editline]29th October 2012[/editline]
[QUOTE=Wizard of Ass;38232654]Don't revert timer.lua, fix the code instead.
You are not going to get much support if you wish a outdated codebase.[/QUOTE]
The timers aren't giving tracebacks with errors, making it a pain to fix them, I think if I didn't have my own timer library I'd have done the same.
Sorry, you need to Log In to post a reply to this thread.