#Need help with For Loop Key changing

1 messages · Page 1 of 1 (latest)

deft escarp
#

Hi, so basically I'm trying to create a for loop were if a certain criteria is met the current 'key' for that for loop gets set to a certain number and the loop stops that current iteration and starts the loop again from the 'key' that was set.

I attached an image and a PasteBin of a basic example of what I'm trying to do
Lmk if you have any questions about what I'm trying to figure out

(The code in the image is Psuedo Code, I'm just using it to get question across, I'm not actually using it, so thats why some things might look weird)

https://pastebin.com/qzGnvBYx

keen chasm
#

id recommend using a while loop rather than a for loop then iterating the key manually

#

that way you have more control over what the key is at any given point

deft escarp
#

And yea you're right I can see how I get more control over the loops iteration when using a while loop lol