Sorasyn commented on a Page, Cool Meter  -  Feb 17, 2014

That's quite the broken piece of code you've brought to us today. Did you not do any basic testing or debugging?

First off, you don't have any closing brackets for anything. That'll cause all sorts of problems.

Lastly, you have a random integer generator for numbers 1 through 20, but check through 25.

Conscious  -  Feb 18, 2014

In addition, the floor detection doesn't actually change, it's just checking. Also, most of the if statements are unnecessary. If the intervals of 5 are desired, one could simply calculate $rand(1,25) then multiply it by 4. With that in mind, this entire snippet could be condensed to about 4 lines.

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.