oh sorry I meant to explain but got side-tracked
What you were doing wrong was that you were using for-next loops the wrong way. Lets imagine you want to read some data into an array for example, first you'd want to read in a row of data so you'd do this
for x = 1 to 5
read array(x,1)
next x
then you would want to read data from different rows into the array so you would put a for next loop around the previous code because you want to read a row of data and then read all the rows of data
for y = 1 to 5
for x = 1 to 5
read array(x,y)
next x
next y
What happens here is the y for-next loop is set to 1 then the x for-next loop is set to 1 then the data is read into to the array at array(1,1), then the x for-next loop increments x to 2 and reads the data into array(2,1); this repeats so data is read into array(3,1), array(4,1), array(5,1). Then the x for-next loop is at 5 so it exits its loop, now the y for-next loops hits "next y" so it increments y to 2, now x is reset to 1 from this line "for x = 1 to 5" so the data is read into the array like array(1,2), then array(2,2), then array(3,2), this keeps happening until both for-next loops varialbes, x and y are both 5 then no more loops are done
Also when printing the data from the array to the screen, you'll either want do this by printing a horizontal row of tiles to the screen, then looping this a set number of times with different verticle increments; or by printing a verticle column of tiles to the screen then looping this a set number of times with different horizontal increments.
So say to do a horizontal row of tiles first you would do
for x = 1 to 5
if map(x,y) = 0 then paste image 1, x * 32 - 32, y * 32 - 32
if map(x,y) = 1 then paste image 2, x * 32 - 32, y * 32 - 32
next x
then you would want to repeat this code with increasing the verticle variable with each repeat like so:
for y = 1 to 5
for x = 1 to 5
if map(x,y) = 0 then paste image 1, x * 32 - 32, y * 32 - 32
if map(x,y) = 1 then paste image 2, x * 32 - 32, y * 32 - 32
next x
next y
One final note to make your code more efficent do this
Rem Project: tilegame
Rem Created: 18/08/2004 13:06:55
Rem ***** Main Source File *****
flush video memory
sync on : sync rate 0
hide mouse
load image "background.jpg", 1
load image "platform.jpg", 2
dim map(5,5)
for y = 1 to 5
for x = 1 to 5
read map(x,y)
next x
next y
do
for y = 1 to 5
for x = 1 to 5
paste image map(x,y), x * 32 - 32, y * 32 - 32
next x
next y
sync
loop
data 1,1,1,1,1
data 1,1,1,1,1
data 1,1,1,1,1
data 1,1,1,1,1
data 2,2,2,2,2
What it does is just read the image number from the array, straight into the paste image command; as long as the image exists this is the best method for displaying tiles to screen.
pizzaman