Ask coding questions

← Back to all posts
Timer going faster
VulcanWM

Whenever I press the level buttons, the timer goes faster than it should go, even though it is normal whenever I normally start the game without pressing the level buttons.
Why is this and how do I fix it?
Repl link: https://replit.com/@VulcanWM/OddOneOut

Answered by JustCoding123 [earned 5 cycles]
View Answer
Voters
VulcanWM
Comments
hotnewtop
JustCoding123

The problem is that in changeLevel() you do startTimer() again.

VulcanWM

oh yeah tysm! @JustCoding123

JustCoding123

@VulcanWM You're welcome.