"Count with" is not working as i expected

Hello thunkers.
Im stucked in s very simple problem, and i really dont know what i do wrong. Maybe im just too tired and i dont see the issue:


It supposed to show: 1,1, then 1.2, then 1,3 … 2.1, then 2.2 and so on…
All is showing is 0.0 and i dont see the problem :thinking:

1 Like

I would just have it repeat 10 times to wait 1 second then change the value by 1.

1 Like

Its only a simplified example of what i need. I can remove label and wait blocks. The problem is that app stucked in the first loop, whitout any contor increase.

1 Like

The loop block does not know how to initialize app wide variables. Use the loop variables instead.

See this demonstration, @mimostel
image

Choose the option before last, Rename variable…

image

This will work
image

1 Like

ok, got this. thank you. but seems odd that cant use my vars :thinking: as long as i need more that just 1 for my 2 counts.
And renaming “i” var will mess my code, renaming ALL "i"s if theres more in my blocks

1 Like

i think ill just get rid of “count” and use a repeat while with contor inside instead.

1 Like

No, it shouldn’t do that. Whenever add a new loop block it will use the default “i” or “j” and even if it used your created variable then select the “i” or “j” then rename to whatever you want.

But it does… Just tested that

2 Likes

This onlly happens if you copy blocks. but if you add the blocks from the Control drawer then it will not happen.

Loop-in-Loop

3 Likes

As usually, you are always my life saver in terms of Thunkable. Thank you very much !

3 Likes