How to reset looping integer

Hi i am trying to loop numbers and it is working normally but if i reset and call the event i am getting output as zero

I don’t understand where i am making mistake

edit - nah, I’m wrong

Basically i am trying change the highlighted number to 4 or 5 sometimes

Seems right. I’ve just recreated it and it works as intended, looping 1-2-3-0 and 1-2-3-4-0 respectively.