Hi! I know how to cancel task, but I have a problem... I code a minigame and now, when you play two times, the timer down 2 times faster, if you play 3 times, the timer down 3 times faster. I supposed is that the task is being executed multiple times. I know, why you don't cancel it when the game stop? That's because I'm using the same task in 10 different rooms, and if I cancel task object, I supposed that it will cancel all. Also I try to save the object on a array when I start the game and cancel this object when the game get stopped, but it didn't work! The error was exactly the same... Anybody know what I can do?
Do you use classes? If yes, is it something like this? Match.php Timer.php In Match.php: PHP: $timer = new Timer(); Now just cancel the $timer when the game ends in the same class.