09-16-2014, 05:34 PM
Hello, welcome to the forum.
Please use the [ shcode=lua ] tag for embedding Lua code next time, it is much more readable that way.
When Lua says "attempt to index global 'XYZ', it means that you're using XYZ and Lua doesn't know what it is. It even provides you with the location of the problem, and the stacktrace usually shows you which functions were called that lead to the problem.
In your particular case, the error says that line 34 called function setAlarm and it broke down on line 21 becayse the symbol 'Root' is not known to Lua. And indeed, there is no such symbol; I suppose you meant to write
Please use the [ shcode=lua ] tag for embedding Lua code next time, it is much more readable that way.
When Lua says "attempt to index global 'XYZ', it means that you're using XYZ and Lua doesn't know what it is. It even provides you with the location of the problem, and the stacktrace usually shows you which functions were called that lead to the problem.
In your particular case, the error says that line 34 called function setAlarm and it broke down on line 21 becayse the symbol 'Root' is not known to Lua. And indeed, there is no such symbol; I suppose you meant to write
cRoot:Get():BroadcastChat(...)