For index variable already in use
You have nested For loops that are using the same index. For example:
For i% = 1 to 10
For i% = 1 to 20
print i%
next i%
next i%
Change the index on one of the loops to another variable name.