image loading
I am trying to get an image to load but it an error come up whenever I try. the error is "pygame.error: Couldn't open data\menu.bmp" This is my code:import pygame, sys
from pygame.locals import *
pygame.init()
Surface = pygame.display.set_mode((600, 450), 0, 32)
menuimage = pygame.image.load("data\\menu.bmp")
menu = pygame.image.load(menuimage)
Surface.blit(menu, (50, 50))
how can I get it to work?
(log in to comment)
Something I just noticed while looking at your code. You seem to be loading an image into 'menuimage' then trying to use that menuimage surface to load 'menu'. I don't think you meant to do that as menuimage would not be a file path.