Hello. I'm trying to make a Russian Roulette Game, but I'm having a problem. My main randomized shooting sometimes works as it should but sometimes doesn't. I made the timer to randomize on the click of the mouse button. The problem is that it works fine, but then it randomly crashes saying Sound Number illegal at line...etc. Here's the code:
load sound "C:\Users\pc\Desktop\Gun_Shot_Sound_Effect.wav", 1
load sound "C:\Users\pc\Desktop\Empty_gun_sound_effect.wav", 2
do
newsound = 1
for i = 1 to 2
if sound playing (i) = 1 then newsound = 0
next i
if newsound = 1 and mouseclick() = 1
NUMB = rnd(2)
play sound NUMB
randomize timer()
endif
loop
Any help would be appreciated.