What is the problem in these blocks

Everytime I use these “counting” metode to get rows out of the DB something gets crazy. Look at the down left corner in the video. The counting should only go to 8 with the repeat 8 times. What do I do wrong???

I can’t see the video , maybe upload again?

Given that the video does not work, perhaps you can describe the behavior you get?

It is counting to 50 and no break on 1 sec.

Is it possible that you have multiple instances of the “get_point” function being simultaneously launched?

I see that you have one call to “get_point” in the unidentified logic block on the right; but that block, what is calling it?

Because you rely on the value of “spiller_nr” to go from 1 to 8, perhaps using a “count with” block instead of a “repeat”; the “count with” will take care of incrementing the value, will take care of initializing it to 1 and will never push it past the upper limit.

You were right. That get_point was called 8 times from a nother place. So it helped when I moved it. But I like to know a little more about how to use the count with. in this case. I hope you can help me showing som blocks how to make this “count”


You simply import all the stuff you presently have in your current get_point procedure inside the “count with” loop, with the exception of checking or setting the value of “spiller_nr” since the loop component takes care of that.
Given that the loop would typically take 8 seconds to run, the procedure may disable the button that calls it right away, and re-enable it after it is finished. That would prevent multiple instances being launched.

@funhall I think that you are running into the problem described (and solved) in Asynchronous Blocks within Loops.