11-10-2004, 07:06 AM
hey everyone im working on graphics bitmaps and such, having a great time learning but im stuck. here is the code
it keeps saying out of data...what have i done wrong????? thanks i have only posted the map not the other sprites so as not to take up space. the "out of data" statment occurs right here:
READ map(x, y)
thanks
Code:
FOR y = 1 TO 15
FOR x = 1 TO 21
READ map(x, y)
NEXT x
NEXT y
FOR y = 1 TO 15
FOR x = 1 TO 21
IF map(x, y) = 3 THEN PUT (x * 10 - 10, y * 10 - 10), grass
IF map(x, y) = 2 THEN PUT (x * 21 - 21, y * 16 - 16), jester
IF map(x, y) = 1 THEN PUT (x * 10 - 10, y * 10 - 10), wall
NEXT x
NEXT y
SLEEP
'map
DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,1,0,0,0,0,1,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,1,0,0,0,0,1,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,1,0,0,0,0,1,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,1,0,0,0,0,1,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,1,0,0,0,0,1,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,1,0,0,0,0,1,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,1,0,0,0,0,1,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
it keeps saying out of data...what have i done wrong????? thanks i have only posted the map not the other sprites so as not to take up space. the "out of data" statment occurs right here:
READ map(x, y)
thanks