In this timer of mine, as long as I have to count down the minutes, everything is fine. But the best part comes when I want to count down the hours; at this point, it subtracts 1 hour (OK) .. it sets the minutes variable to "59" (OK) .. but since at that moment, the seconds variable obviously corresponds to "0" .. then it also subtracts 1 minute. Let's say that an unlikely solution of mine would be to set the minutes to "60" .. so by subtracting 1 minute, I would still find myself with a correct count. But honestly, after having subtracted 1 hour, seeing that the minutes start from "60" and not from "59" .. literally makes you laugh out loud
Here is sample code for you.
@Anke, I thought that to insert an event at the end of the countdown, it was simply compared to "0", but I was wrong
I also tried to check the "sec" variable, but when it reached 0, it didn't open the new screen.
Problem solved
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.