Variable calculation won't work properly

Hi!
I am making a timer with two different variables for minutes and seconds.
If there are 0 seconds I want to obviously remove 1 from a minute variable but the calculation doesn't seem to work for some reason. I also tested this in another macro and the result was the same.
image

Literally, 30 minutes ago it was all okay but now it just decided to break
As I said I also tested this in a plain macro and the same thing happened

Because you are setting afk_minutes to a value -- -1. You want to set it to the result of a calculation -- in this case, presumably, afk_minutes - 1

Also, unless there's a really good reason to use minutes and seconds in your countdown, convert the whole lot to seconds and down from there. It'll make life a lot easier :wink:

1 Like

Alright, it worked!
I don't know how in the world did it work before without using the "afk_minutes" and just simply "-1"

And yea, I need the minutes and seconds because I'm using it as a display to show time. I think minutes with seconds are better than just minutes in that way

You may find some elements (for setting a number of minutes, calculating the count down to zero, and sounding a chime at the end) in this:

Menu Bar Display of Sprint Time Countdown

Screenshot 2022-05-31 at 15.46.47