john
john

Reputation: 1

Why am I getting this error message and how do I fix it?(Pygame)

I am trying to load some music for a game I am building with pygame, but keep getting this error message, how can I fix this?

pygame.error: No file 'Quickfire Deceptive[Mp3].mp3' found in working directory

I tried to load a .mp3 file in pygame, expecting the file to load and the rest of the code to run properly. However, I recieve this error messaqge instead.

import pygame as p
import time as t
import random as r
import pygame.freetype
from test1 import setup
from test1 import move_player_character
from test1 import show_text
from test1 import walls
from test1 import killbox
from test1 import room_win
from test1 import barrier
from test1 import mock_boss
from pygame import mixer
p.mixer.init()
room=0
stage=0
count=0
Ywallstart=0
Ywalllength=0
Ywallend=0
Xwallstart=0
Xwalllength=0
Xwallend=0
Ydoorstart=0
Ydoorlength=0
Ydoorend=0
Xdoorstart=0
Xdoorlength=0
Xdoorend=0
barrierstart=0
barrierend=0
playery=700
playerx=400
mixer.init()
mixer.music.load("Quickfire Deceptive[Mp3].mp3")
#mixer.music.set_volume(3)
#mixer.music.play()
movey1=0
sword=0
movey2=400
movex1=0
movex2=0
movex3=0
movex4=0
movex5=0
movex6=0
moveyfast1=0
movexfast1=0
movexfast2=0
movexfast3=0
movexfast4=0
movexfast5=0
movexfast6=0
player_hp=5
boss_hp=15
setup()
a=1
while(True):
    mock_boss()
    print(mock_boss())
    p.display.flip()

Upvotes: -3

Views: 23

Answers (0)

Related Questions