Code Behavior Gone Wild

BlitzMax Forums/BlitzMax Beginners Area/Code Behavior Gone Wild

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I ran it for 32 minutes but the b variable remained at 61.0017624.

And it would remain at that value forever if you left it.

As I explained earlier, once it falls into the "gap" that you've programmed into it, you are pretty much stuck... (you need to click to increase b until it reaches 66 or so.)

Why 66?

Because 5 * 66 = 330
If r>329 And r<361

330 just makes it into the 6th segment of your circle. After which time it will slowly increase again by itself

Anything between 61 and 66 will not be enough to get outside of the gap you've coded into lights().

Remember, 6 * 61 >= 360, which resets r back to 0.
r :+ 61 + 61 + 61 etc... >= 360, which resets r back to 0.

r :+ 61
If r>29 And r<61 .... FALSE (61)
r :+ 61
If r>89 And r<121 ... FALSE (122)
r :+ 61
If r>149 And r<181 ... FALSE (183)

etc...

:-)

Back to the drawing board, Emmett, TheBeginner.