sethook function. The result, however, was an error: attempt to call global 'sethook' (a nil value). I didn't pay a lot of attention to it then and worked around it.Today, someone asked me about this very same problem, and I couldn't give an answer to this pretty simple question. So I wrote a little test script to try it out a little:
1
2
3
2
3
sethook ("second", 0)
addhook ("second", "func")
function func () print("...") end
Result:
1
LUA ERROR: sys/lua/test3.lua:1: attempt to call global 'sethook' (a nil value)
So am I doing something entirely wrong here, or are there other people with the same problem?
sethook - nil value?
1 
Offline
Aww man how much time do i need to wait so that i can use it!