for i=1 to 20
if music playing(i)=1 then d=i
next i
is a lot less work, but you don`t need to do that anyway.
you need to use load cdmusic to load the track
ink rgb (1000,1000,1000,),0 is gibberish, you can only go up to rgb(256,256,256) (256*256*256=16777216 colours)
you have a$ and b$ but they don`t have values since you never made them equal anything
this would play track one and do all the checks you need to play a cd properly.
song=1:rem song your gonna play
Tracks= get number of cd tracks():rem er...gets the number of tracks on the cd
if Tracks>0:rem if you can`t find tracks then seems fair to assume no cd is there
rem else the CD is present, play a track
load cdmusic Tracks, song: rem load track one for playback
loop music song :rem and as long as nobody presses space then just play that track over and over
rem User prompt to continue
center text screen width()/2,screen height()/2,"HIT ANY KEY"
wait key
rem Stop and delete CD music
stop music song
delete music song
endif
this was roughly adapted from the help file, just go into help and select the help files for the cd commands and then look at the usage example (this is cut down to clarify things a little), cheers
Mentor.