Stuck in a loop

BlitzMax Forums/BlitzMax Beginners Area/Stuck in a loop

PaulJG(Posted 2006) [#1]
Would some kind person be able to explain to me why the following code fails:



This is assuming that NUM=63, what it should be doing is checking - then switching, if there's no more checks quit out of the routine.

But its stuck in its own loop :(


Dreamora(Posted 2006) [#2]
Only reason I see here is that you take a,b for comparision from tiles[] but you change the array tile_order.

Until you either compare with tile_order or change tiles[] it can't end with this structure as tiles is unchanged on each recheck but tile_order gets swapped all the time.


PaulJG(Posted 2006) [#3]
DOOOHHH !!!!

Thanks for pointing that out :)