Knight's Tour broken code

This forum is for posting code that needs help.

Post Reply
luiscasanova
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.
Attachments
Knight's Tour.zip
(150.02 KiB) Downloaded 820 times
Gordon R
Posts: 10
Joined: Wed Sep 21, 2005 10:30 pm
Location: The Netherlands
Contact:

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.

Gordon
Post Reply