Great, thanks for formatting that. Unfortunately I don’t recognize the language you are using, but am guessing the [n 10] means to go through the loop 10 times? If so, that’s not enough.
In other languages here, like python, you’d just use “loop” which runs until you finish or break out of the loop. If there is not a similar way to do that, you might just increase the 10 to 1,000?
And btw, if you’re new to coding, you may want to go with javascipt or python as those are more commonly used here (hence, easier to discuss and get help with), though I presume you have some reason for using whatever language you are using.