2

This is my code when adding music in line 13 it comes up with the error "pygame.error: Failed loading libvorbisfile-3.dll: The specified module could not be found"

from pygame import *
import random, sys, pygame, os

pygame.init()
mixer.init()

#purple - bg start screen

music = pygame.mixer.music.load("theme.ogg")
pygame.mixer.music.play(-1)

FPS = 60
vel = 8
width = 1920
height = 1080

playerSize = 80
winSize = (width, height)
win = pygame.display.set_mode(winSize)
run = True
playerX = random.randint(0, 1920 - playerSize)
playerY = 1080/2 - playerSize/2

purpleImg = pygame.image.load("bg.png")
playerImg = pygame.image.load("player.png")

purpleImg = pygame.transform.scale(purpleImg, (width, height))
playerImg = pygame.transform.scale(playerImg, (80, 80))
clock = pygame.time.Clock()
  • Could you please paste the full traceback? – Jerry Sep 24 '22 at 16:42
  • Are you on Windows store python? – Starbuck5 Sep 24 '22 at 16:53
  • `from pygame import *` is nt necessary and wildcards are poor practice. You have already imported pygame in the line below. – D.L Sep 24 '22 at 17:26
  • Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "c:\Users\caspa\OneDrive\Desktop\Python\OTHER\Game\main.py", line 9, in music = pygame.mixer.music.load("theme.ogg") pygame.error: Failed loading libvorbisfile-3.dll: The specified module could not be found. – Caspar Eggar Sep 24 '22 at 17:56

0 Answers0