To prevent this, I have this:
The problem is, this doesn't seem to work! And every time I use the "While" loop, the game freezes, and refuses to work. What I want to know is, is there any way to fix this? Does anybody know a better way to randomly generate a world? I can't use an array, because it isn't a tile map. I would really appreciate it of someone could help me out. Thanks!