So I'm implementing an option to turn the music off in the game I'm currently developing. I just can't seem to get it to work right. I know its probably a stupid error I just can't see, but if you could help me out I'd greatly appreciate it.
if ( dbMouseX( ) > 715 && dbMouseX( ) < 779 && dbMouseY( ) > 535 && dbMouseY( ) < 599 )
{
if ( !dbSoundPlaying( 2 ) )
{
if ( dbMouseClick( ) )
{
dbResumeSound( 2 );
}
}
if ( dbSoundPlaying( 2 ) )
{
if ( dbMouseClick( ) )
{
dbPauseSound( 2 );
}
}
}
The music starts on and I have it so I can turn it off, but then I can't turn it back on.