Sorry that didn't post properly.
The following code is the start of a FPS, my problem is that i load the images at the start and assign the numbers to them; i then use the paste command to load them. When i run the program i get the error message that it cannot load the image; that it doesn't exist. However when you compile it, it finds no errors. The files are in the right folders and when the error message is displayed the image is displayed on the screen so its loading it, it just doesn't like to.
(Error on line 20)
`setting visaul properties
set display mode 640,480,32
hide mouse
sync on
sync rate 30
rem ****************************************************************************************************************
rem *********************************************MEDIA**************************************************************
rem ****************************************************************************************************************
load bitmap "graphics\main001.bmp",1
load bitmap "graphics\mainlogo.bmp",2
load bitmap "graphics\crow.bmp",3
load bitmap "graphics\story1.bmp",4
load bitmap "levels\dirt.bmp",5
`load image "graphics\mainfade.bmp",6
rem ****************************************************************************************************************
rem *********************************************Main game loop*****************************************************
rem *******************************************(image media only)***************************************************
rem menu
paste image 1,0,0
wait 3000
set cursor 280,400
print "press any key to continue"
suspend for key
`fade out screen
for f=0 to 255 step 8
r=255-f
g=255-f
b=255-f
set gamma r,g,b
next f
cls
rem ****************************************************************************************************************
rem *********************************************company logo*******************************************************
rem ****************************************************************************************************************
`load company logo BS
paste image 2,0,0
`fade back in menu screen
for f=0 to 255 step 8
r=f
g=f
b=f
set gamma r,g,b
next f
`start of menu commands
rem ****************************************************************************************************************
rem *********************************************Menu loop**********************************************************
rem ****************************************************************************************************************
main:
paste image 3,0,0
show mouse
do
`Menu Options
`START
if btn_click(25,64,166,95)
gosub start
endif
`PRACTICE
if btn_click(218,87,321,117)
gosub practice
endif
`OPTIONS
if btn_click(371,104,482,141)
gosub options
endif
`EXIT
if btn_click(230,312,406,352)
gosub exit
endif
`Button Clcik Function
function btn_click(x1,y1,x2,y2)
clicked=0
if mousex()>x1 and mousex()<x2
if mousey()>y1 and mousey()<y2
if mouseclick()=1
clicked=1
endif
if mouseclick()=2
clicked=2
endif
endif
endif
endfunction clicked
sync
loop
rem ****************************************************************************************************************
rem *********************************************Main game**********************************************************
rem ****************************************************************************************************************
`start
start:
cls
paste image 4,0,0
wait 10000
cls
Backdrop on
Set camera range 1,5000
Fog on
Fog distance 4000
Fog color RGB(128,128,128)
Color Backdrop RGB(128,128,128)
Rem make matrix
Make matrix 1,50000,50000,20,20
Rem texture matrix
`Prepare matrix texture 1,1,1,1
`Fill matrix 1,0,1
rem Randomize the matrix
`randomize matrix 1,80
rem load level
Load object "levels\crow1.x",2
rem Load object
position object 2,5000,Get Ground Height(1,5000,5500),5500
Rem Main loop
Do
set cursor 0,0
print X#
print Y#
print Z#
Rem Store Object angle
CameraAngleY# = Camera angle Y()
Rem Control input for camera
If Upkey()=1
XTest# = Newxvalue(X#,CameraAngleY#,20)
ZTest# = Newzvalue(Z#,CameraAngleY#,20)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
Move camera 10
Endif
Endif
If Leftkey()=1 then Yrotate Camera Wrapvalue(CameraAngleY#-10)
If Rightkey()=1 then Yrotate Camera Wrapvalue(CameraAngleY#+10)
X# = Camera position X()
Z# = Camera position Z()
Y# = Get ground height(1,X#,Z#)
Position Camera X#,Y#+35,Z#
Rem Refresh Screen
Sync
Loop
return
rem ****************************************************************************************************************
rem *********************************************Practice mode******************************************************
rem ****************************************************************************************************************
`practice
practice:
cls
suspend for key
return
rem ****************************************************************************************************************
rem *********************************************Options menu*******************************************************
rem ****************************************************************************************************************
`options
options:
cls
suspend for key
return
rem ****************************************************************************************************************
rem *********************************************exit game**********************************************************
rem ****************************************************************************************************************
`EXIT
exit:
cls
end
Not much time has passed but already she likes Concrete better then Grass.