Is there a way to exit or end programmes in DBPro properly? I mean, I know that the command END is used to end the program, and my code is doing that, except for the fact that I always get an error screen saying that my Dark Basic Pro project is'nt working anymore and that it is searching a solution for the problem.
Here's a part of the Main Menu, where upon choosing choice 6 (Exit) and pressing the returnkey, the program ends:
Is there anything wrong with my code, or are there better ways for ending programs (without getting the error) ?
do
lastup = lu : lastdown = ld
lu = upkey() : ld = downkey()
if ld = 1 and lastdown = 0 then choice = choice + 1 : PLAY SOUND 10
if lu = 1 and lastup = 0 then choice = choice - 1 : PLAY SOUND 10
if choice = 1 then POSITION OBJECT 567, -5.5, 1, -16
if choice = 2 then POSITION OBJECT 567, -5.5, -1, -16
if choice = 3 then POSITION OBJECT 567, -5.5, -3, -16
if choice = 4 then POSITION OBJECT 567, -5.5, -5, -16
if choice = 5 then POSITION OBJECT 567, -5.5, -7, -16
if choice = 6 then POSITION OBJECT 567, -5.5, -9, -16
if choice > 6 then choice = 1
if choice < 1 then choice = 6
if spacekey() = 1
Pscale = 0 : SCALE OBJECT paddle, 210, 210, 70
Fire = 0 : HIDE OBJECT 640
Pshrink = 0 : SCALE OBJECT paddle, 210, 210, 70
Inverse = 0 : links$ = "left" : rechts$ = "right"
SPEEDY = 0 : lazer_speed# = 0.0003
return
endif
if choice = 6 and returnkey() = 1
end
endif
sync
loop
Thanx in advance!
Cheers
Slayer rules!!! Yeaaah, man!