dim world(8,6)
for a=0 to 9
for b=0 to 7
You dim an Array 0 to 8, 0 to 7 but you try to enter values into an array of 0 to 9, 0 to 7.
this can't be right can it?
SET DISPLAY MODE 800,600,32
sync on
sync rate 200
hide mouse
load bitmap "c:documents and settingsdpdesktopgregblob.bmp", 1
create bitmap 2, 1000, 800
xiny=0
yiny=0
dim world(9,7)
for a=0 to 9
for b=0 to 7
world(a,b)=rnd(2)
z=(world(a,b)/5)
copy bitmap 1, 100*(world(a,b)-5*z), 100*z, 100*(world(a,b)-5*z)+100, 100*z+100, 2, 100*a, 100*b, 100*a+100, 100*b+100
next b
next a
copy bitmap 2, xiny, yiny, xiny+800, yiny+600, 0, 0, 0, 800, 600
do
if rightkey()=1
inc xiny, -5
copy bitmap 2, xiny, yiny, xiny+800, yiny+600, 0, 0, 0, 800, 600
endif
if leftkey()=1
inc xiny, 5
copy bitmap 2, xiny, yiny, xiny+800, yiny+600, 0, 0, 0, 800, 600
endif
sync
loop
Fixed it see if you can see what's different.