[英]I am getting an error with argument 1 must be pygame.Surface, not None. How do I fix this
[英]I am making a game with python in pygame. I keep getting this error when I try to load my picture: "argument 1 must be pygame.Surface, not str"
如何修復我的代碼?
image = "r'Applications\\SCHOOL\\ComputerScience\\GAMESUMMATIVE\\galaxyy.jpg"
galaxyPic = pygame.image.load("galaxyy.jpg")
screen.blit("r'Applications\\SCHOOL\\ComputerScience\\GAMESUMMATIVE\\galaxyy.jpg")
image = pygame.image.load("galaxyy.jpg")
screen.blit(image, (whatever coords you want))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.