Need some help.

  • plasma1
    13th Aug 2020 Member 0 Permalink

    Hi, I'm having a little bit of a problem when using event.register(eventType, eventHandler). Whenever I use it with event.tick as its type it does nothing at all. Thank you for the upcoming help.

  • jacob1
    13th Aug 2020 Developer 0 Permalink
    Works fine for me:
    event.register(event.tick, function() print("test") end)

    Might be an issue in your code, if you post that it might help.
  • plasma1
    13th Aug 2020 Member 0 Permalink

    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.

    Edited 3 times by plasma1. Last: 14th Aug 2020