Knight's Tour broken code

This forum is for posting code that needs help.

Posts: 6
Joined: Tue Sep 08, 2009 4:46 pm

Knight's Tour broken code

Post 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.
You do not have the required permissions to view the files attached to this post.
Gordon R
Posts: 10
Joined: Wed Sep 21, 2005 10:30 pm
Location: The Netherlands

Post 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.