Commit 8a33a0d9 authored by santiago duque's avatar santiago duque

safe try catch for no index audio

parent f45991da
......@@ -51,7 +51,8 @@ def play_sound(index):
try:
channel = sound_array[current_sound_index].play()
except Exception as X:
print("no sound with this index: " + current_sound_index + " | " + X)
print("no sound with this index: " + current_sound_index)
print(X)
while channel.get_busy():
pygame.time.wait(150) # ms
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment