[EDIT]
Problem solved... See below for details [/EDIT]
@IanM, no, i don't think that that's it.. thanks anyway...
@DB_Maniac_164, but without the sync command im left with a few moments of black screen where there should be an increasing bar going across the screen.
@zircher, But it's this function that is crashing the program... and i still can't figure out why...
Here's everything that i have (up the the first time that the load bar function is called):
`Initial Stuff...
Sync On : Sync Rate 0
Draw To Front
Set Text Size 14
Set Text Font "Arial"
`menu function
_menu_start()
`Set's up a clear screen for the load-bar function
BackDrop Off
`this just sets everything up
_initialize_world()
End
Function _menu_start()
Disable Escapekey
Set Window On
Hide Window
Set Window Layout 0,0,0
Set Window Position 10,10
Set Window Size 476,476
Set Display Mode 476,476,32
Load Image "imagesmenu.png",1,1
Load Image "imagesplay_over.png",2,1
Load Image "imagesoptions_over.png",3,1
Load Image "imagesabout_over.png",4,1
Load Image "imagesexit_over.png",5,1
Sprite 1,0,0,1
Sprite 2,500,500,2
Sprite 3,500,500,3
Sprite 4,500,500,4
Sprite 5,500,500,5
Show Window
Do
`play button
If MouseX() >= 161 And MouseX() <= 261 And MouseY() >= 234 And MouseY() <= 257
Sprite 2,161,234,2
If MouseClick() = 1
ExitFunction
EndIf
Else
Sprite 2,500,500,2
EndIf
`options button
If MouseX() >= 283 And MouseX() <= 383 And MouseY() >= 234 And MouseY() <= 257
Sprite 3,283,234,3
If MouseClick() = 1
Print "Options are not as yet available"
EndIf
Else
Sprite 3,500,500,3
EndIf
`about button
If MouseX() >= 161 And MouseX() <= 261 And MouseY() >= 276 And MouseY() <= 299
Sprite 4,161,276,4
If MouseClick() = 1
Print "About is not as yet available"
EndIf
Else
Sprite 4,500,500,4
Endif
`exit button
If MouseX() >= 283 And MouseX() <= 383 And MouseY() >= 276 And MouseY() <= 299
Sprite 5,283,276,5
If MouseClick() = 1
End
EndIf
Else
Sprite 5,500,500,5
EndIf
Sync
Loop
EndFunction
Function _initialize_world()
If Check Display Mode(800,600,32) = 1
Set Display Mode 800,600,32
Else
If Check Display Mode(800,600,16) = 1
Set Display Mode 800,600,16
Else
If Check Display Mode(640,480,16) = 1
Set Display Mode 640,480,16
Else
Print "Error - Display Mode Not Available, Program Cannot Execute"
Wait Key
End
Endif
Endif
Endif
Set Window Off
_load_bar(10)
`Stops the camera going to where a new object is created
Autocam Off
Hide Mouse
rem real random generator
_true_randomize()
_load_bar(15)
`More stuff goes here, but is not necessary at the moment.
EndFunction
Function _load_bar(percent)
horiz_offset = 0
vert_offset = 100
Ink 0,RGB(200,200,200)
Cls
Ink RGB(50,50,100),0
Line (Screen Width()/2 + horiz_offset - 152),(Screen Height()/2 + vert_offset - 17),(Screen Width()/2 + horiz_offset + 151),(Screen Height()/2 + vert_offset - 17)
Line (Screen Width()/2 + horiz_offset - 152),(Screen Height()/2 + vert_offset + 16),(Screen Width()/2 + horiz_offset + 151),(Screen Height()/2 + vert_offset + 16)
Line (Screen Width()/2 + horiz_offset - 152),(Screen Height()/2 + vert_offset - 17),(Screen Width()/2 + horiz_offset - 152),(Screen Height()/2 + vert_offset + 16)
Line (Screen Width()/2 + horiz_offset + 151),(Screen Height()/2 + vert_offset - 17),(Screen Width()/2 + horiz_offset + 151),(Screen Height()/2 + vert_offset + 16)
Ink RGB(100,100,100),0
Box (Screen Width()/2 + horiz_offset - 150),(Screen Height()/2 + vert_offset - 15),(Screen Width()/2 + horiz_offset - 150 + (percent*3)),(Screen Height()/2 + vert_offset + 15)
Ink 0,0
Center Text (Screen Width()/2),(Screen Height()/2 - 50),"Please Wait"
Center Text (Screen Width()/2),(Screen Height()/2 - 35),"HellBorn: Wounded Prey Is Loading"
Center Text (Screen Width()/2),(Screen Height()/2 + 100),Str$(percent)+"% Loaded..."
Ink RGB(255,255,255),0
Sync
EndFunction
That won't really run without the images, but if someone could spare 10 minutes to go over the code, i'd much apreciate it...
It's when it get's to the first load bar function call... It just ends the program... as if there was an End command.
But, when i take out the Sync command at the end of the load_bar function, everythign works fine, but you can't see any of the load bar...
This is so frustrating, because it
was working fine, then it stopped... arrrggg...
Thanks aging to those who have helped/help...

Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy