Hello,
When I build a simple timer with only one iterations, there is a bug with the program.
I work with the zerobrane ide.
I open (already exist) a empty new file called “data.txt” at the main.lua directory, and write “test” inside, then close.
But the program restart the code infinitly ( print event.count = 1 each three second ).
What to do ??
Thanks.
local function update(event) print(event.count) // print "1" each time, so the program restart the code infinitly local file=io.open(system.pathForFile("data.txt",system.ResourceDirectory),"w") file:write(json.encode("test")) io.close(file) file=nil end timer.performWithDelay(3000,update,1)