# Problems with random track generator

**URL:** <https://forum.kirupa.com/t/problems-with-random-track-generator/43664>\
**Category:** Uncategorized\
**Created:** [February 24, 2004, 10:31pm UTC](https://forum.kirupa.com/t/problems-with-random-track-generator/43664 "2004-02-24T22:31:57Z")\
**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, 10:31pm UTC](https://forum.kirupa.com/t/problems-with-random-track-generator/43664/1 "2004-02-24T22:31:57Z")

</div>

hello,

I’m making a car game/maze game where you can choose to play premade levels, design your won levels, or play a random track.

Iv’e started on the random track function and I’m done with it except for a few bugs that puzzle me.

I commented as best as I could. The fla is attached.

**Problem #1:**  
The second time you click the random track button, the first three tiles are removed.

**Problem #2:**  
Sometimes the while loop fails to end causing it to crash. (About every one in ten times you press the button)

**Problem #3:**  
This is not a current problem, but I can’t think of an efficitn way to run the hit test, to check if the car is on the track. (no car yet)
