I’ve been trying to create a simple function that makes a timer which increases every second.
This is my script.
function init(self)
self.st = 0
end
function update(self, dt)
self.st = self.st + dt
local time = self.st
label.set_text("#label", "Survival Time "local time"")
end
end
But every time I try to build it says I need to add a parenthesis near local. I have tried to reformat it, using self.st itself, adding parenthesis and hash marks but it still won’t even load so I can’t even figure out if there are errors in the rest of my code.