I do not really have time to go through what is wrong here so far as to say you are missing the setInterval function etc..
As a very crude example here is a working project.
I have not bothered to workout or add the correct Math code but have used most of what you had in a very
crude way for times sake and also maybe a bit easier to understand.
countdown sample.hype 2.zip (15.7 KB)