# Problems with random track generator

**URL:** <https://forum.kirupa.com/t/problems-with-random-track-generator/43560>\
**Category:** programming\
**Created:** [February 24, 2004, 1:33am UTC](https://forum.kirupa.com/t/problems-with-random-track-generator/43560 "2004-02-24T01:33:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SnailMan](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@SnailMan](https://forum.kirupa.com/u/SnailMan)\
**Post date:** [February 24, 2004, 1:33am UTC](https://forum.kirupa.com/t/problems-with-random-track-generator/43560/1 "2004-02-24T01:33:31Z")

</div>

I am making a game where you can choose to play the preset levels, build your own track, or make a random track.

I have made the random track function, but there are a few bugs that puzzle me.

I have tried to comment as well as I can and things might not be as efficient as possible, so please feel free to give me suggestions. All the code (except the button) is in frame 1 actions.

Fla is attached.

**Poblem #1:**  
On the 10x10 grid of tiles it generates, sometimes the first three are missing.

**Poblem #2:**  
Sometimes the while loop doesn’t end and causes it to crash

**Poblem #3:**  
Not a current problem, but does anyone have any suggestions on how to do the hit tegst for the car to come?
