Here's some test code
local function test()
graphics.drawLine(100, 100, 200, 200)
end
event.register(event.tick, test)
Edit: Now this is weird, i was coding up a new element and when i reloaded the script, event.register started working.
Edit2: It stopped working again.
Edit3: It works on random occasions.