Using variables to create a timer

 This is an old thread, so I don't know if y'all are still watching, but I think I know why its happening... Once you add "minutes left", as in you're adding text, to the variable value- you likely can no longer do the math (what is the value of 3minutesleft-1?). I recommend putting a static text box that says "minutes left". Then, have just your "minutes" variable only be the numbers.


One more thing- put a condition on your subtraction action to only run if the minutes variable is greater than -1, otherwise, you'll start to display negative minutes left ;)


Good luck!


Tia said:I am trying to create a timer that counts down using variables. For some reason it starts out well but then after 1 minute says "Invalid." I am trying to count time from 4 to 0 minutes. I have the following Actions: - Set variable (minutes) to value 4 - Substract 1 from variable (minutes) every 60 seconds - Change contents of timeText (my textbox to show time) to show variable (minutes) every .1 sec - Add "minutes left" to variable (minutes) The timer says "Invalid" after the first minutes goes ends.

Discussions have been disabled for this post