if you use F7 to follow your program you will find that bounces out at the function command, because this should be at the end of the program or atlease after the loop command. so that it looks like this.
`© Copyright Cretinous™ / Matt Moyes
set display mode 800,600,0
set text size 30 : set text font "arial"
make object cube 1,100 : hide object 1
green=RGB(0,128,0)
color backdrop green
mapsize=500
dim map$(mapsize,mapsize)
maxcubes=20
cubesize=200
fog on : fog color green
fog distance 400
set ambient light 33
color light 0,green
loadfok("caves\cave1.fok",mapsize)
load image "caves\wall1.jpg",2
load image "caves\ground.jpg",3
load image "caves\wall2.jpg",4
`Walls
for i=1 to maxcubes*maxcubes
make object cube 100+i,cubesize
texture object 100+1,2
next i
`Floor
for i=1 to maxcubes*maxcubes
make object plain 10000+i,cubesize,cubesize
rotate object 10000+i,90,0,0
texture object 10000+i,3
next i
`roof
for i=1 to maxcubes*maxcubes
make object plain 20000+i,cubesize,cubesize
rotate object 20000+i,270,0,0
texture object 20000+i,4
next i
for z=1 to mapsize
for x=1 to mapsize
if map$(x,z)="s"
cx=x*cubesize
cy=z*cubesize
endif
next x
next z
position camera 0,cx,0,cz
do
CONTROL CAMERA USING ARROWKEYS 0,1,1
loop
undim map$()
delete image 2 : delete image 3 : delete image 4
function loadfok(filename$,size)
open to read 1,filename$
for y=1 to size
for x=1 to size
read byte 1,tmp
map$(x,y)=chr$(tmp)
next x
next y
close file 1
endfunction
I'm not getting you down am I, Ho Look! another fancy Door?