Just off the top of my head probably a better way

Code:
var num_songs = 2;
var sound_handle;

function switch_sound(snd)
{
     switch(snd)
     {
        CASE 0:
        sound_handle = snd_play(sound1, 100, 0);
        break;

        CASE 1:
        sound_handle = snd_play(sound2, 100, 0);
        break;

     }
}

void main()
{
   random_seed(0);
   var random_sound = integer(random(num_songs ));
   switch_sound(random_sound );
}



Just typed this have not tested it


John C Leutz II