So I tried to convert my midi file to ogg and I still cant get it to work... hope some of you can help me? This is my code:
showTextScreen('Tetromino')
while True: # game loop
if random.randint(0, 1) == 0:
pygame.mixer.music.load('tetrisb.mid')
else:
pygame.mixer.music.load('tetrisc.mid')
pygame.mixer.music.play(-1, 0,0)
runGame()
pygame.mixer.music.stop()
showTextScreen('Game Over')
It gives the error that it cant open tetrisb.mid I tried renaming it and it still says the same... If i can fix this I can fix the other file probably
Here is the error:
Traceback (most recent call last):
File "H:\Programmering\Python\TETRIS!.py", line 487, in <module>
main()
File "H:\Programmering\Python\TETRIS!.py", line 166, in main
pygame.mixer.music.load('tetrisc.mid')
pygame.error: Couldn't open 'tetrisc.mid'
I'm using windows and python 3.8 and i dont mind if im using midi or ogg... I changed my midi file into ogg, hoping it would fix the problem but it didnt. My file is ogg atm