Hi, change the for to "FOR C=0 TO 7" . I think you counted one too many there.
Viewing post in FAQ - Game Jam or Sinclair BASIC questions
I can only see part of your code. Do you have a larger for loop, not seen, around the whole thing? It looks like you have a game loop and you recreate the udg every time? You only need to create the udg once and then you can start your game loop. Move the code in lines 62 to 75 to the beginning and make sure it is only run once.