OK, when you go back to the menu after playing the music, you aren't deleting the music, so when you click on new game again, it tries to load the music again, But as the music has already been loaded, it fails. you either need to load the music before the menu, or you need to delete it after playing.
so basically either:
Deleting the track:
menu:
set display mode 1024,768,32
disable escapekey
do
set cursor 0,0
if text_box(500,600,"New game",RGB(0,0,150),RGB(255,255,255)) then goto Newgame
set cursor 0,0
if text_box(500,650,"Options",RGB(0,0,150),RGB(255,255,255)) then goto options
set cursor 0,0
if text_box(500,700,"exit",RGB(0,0,150),RGB(255,255,255)) then EXIT
sync
loop
Newgame:
cls
load music "###.mp3",1
play music 1
do
if escapekey()= 1
delete music 1
goto menu
endif
loop
options:
cls
do
if escapekey()= 1
goto menu
endif
loop
function text_box(x,y,string$,color1,color2)
click = 0
ink color1,color2
w = text width(string$)
h = text height(string$)
if ((mouseX()> (X - (w/2))) and (mouseX()< (X + (w/2))))
if (mouseY()> Y) and (MouseY() < (Y+ h))then click = mouseclick():ink color2,color1
endif
center text x,y,string$
endfunction click
or
loading earlier:
load music "###.mp3",1
menu:
set display mode 1024,768,32
disable escapekey
do
set cursor 0,0
if text_box(500,600,"New game",RGB(0,0,150),RGB(255,255,255)) then goto Newgame
set cursor 0,0
if text_box(500,650,"Options",RGB(0,0,150),RGB(255,255,255)) then goto options
set cursor 0,0
if text_box(500,700,"exit",RGB(0,0,150),RGB(255,255,255)) then EXIT
sync
loop
Newgame:
cls
play music 1
do
if escapekey()= 1
goto menu
endif
loop
options:
cls
do
if escapekey()= 1
goto menu
endif
loop
function text_box(x,y,string$,color1,color2)
click = 0
ink color1,color2
w = text width(string$)
h = text height(string$)
if ((mouseX()> (X - (w/2))) and (mouseX()< (X + (w/2))))
if (mouseY()> Y) and (MouseY() < (Y+ h))then click = mouseclick():ink color2,color1
endif
center text x,y,string$
endfunction click
Hope that helps
BTW: this should probably be in the DBPro section of the forums, this board is for general chat type threads.
Your signature has been erased by a mod because it's larger than 600x120