I am making a game and all the game runs in a while loop. Because you can't use two while loop, how can I do an action UNTIL something.
Asked
Active
Viewed 30 times
0
-
use a `for` and a `break` – azro Mar 30 '20 at 19:04
-
1You _can_ use two wile loops, you know? – Óscar López Mar 30 '20 at 19:07
-
Can I use two while loop? – JuMpeR6790 Mar 30 '20 at 19:08
-
1Please be more specific about what you really want to achieve. Learn how to provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) – Saimon Mar 30 '20 at 19:10
-
1Of course, why couldn't you? Are you asking how to break out of the outer loop from inside the inner loop? – Barmar Mar 30 '20 at 19:10
-
if I use a break in a while loop that is in an other while loop, will it only break the second while loop? – JuMpeR6790 Mar 30 '20 at 19:10