So I’m quite a beginner in lua, but kinda know how to work in it.
I’m creating a lil’ something for our Gmod (TTT) server, and it requires a function to be executed on an interval.
So after a quick search on the Gmod wiki I came across timer.Create.
I followed the template on the wiki, tested with multiple options, but nothing seemed to work.
I’m not getting any lua errors, the function simply isn’t being executed, at all.
local function fileReading() --Code which works 100% fine, the problem is just the timer. print("Function has been initiated!") end function CreateTimer() timer.Create("Gilbert's amazing timer", 5, 5, fileReading) end CreateTimer()
I have read that in around 2012 timer.Create was broken, but is it really still not supposed to work?
And if it isn’t, are there any ways I can run a function on an interval without timer.Create?
Thanks in advance
-GilbertGobbels (Yes, there are supposed to be 2 'b’s, nickname max prevented me from using it though )