Page 1 of 1

Knight's Tour broken code

Posted: Mon Sep 06, 2010 10:40 pm
by luiscasanova
Ok. I have checked this code several times during the last few hours and I still can find what's wrong. :(

I'm getting a
Runtime Error: Subscript out of range: 24, hiscore$()
(see error log for more information)

exactly at this line of code:

IF VAL(hiScore$(i,3)) > VAL(hiScore$(i+1,3)) THEN

NOTE: in sub RandomStart, change the value of turn from 1 to 62, that way you can see the error without need to solve the puzzle.

Thanks for your help.

Posted: Sat Oct 16, 2010 9:05 pm
by Gordon R
Wow, this one was hard to find.... but
I found it.

Your i variable is not global or something like that.
So, please use another variable like j,l,n, and so on....
but not i.

Gordon