Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird TypeError #27

Open
MasterF1 opened this issue Jun 25, 2021 · 1 comment
Open

Weird TypeError #27

MasterF1 opened this issue Jun 25, 2021 · 1 comment

Comments

@MasterF1
Copy link

MasterF1 commented Jun 25, 2021

Ok so I am at the end of the second video, and I try running the sript with ctrl+ b, but the window opens and closes immediately.

So I went to my terminal to run it, and got a Type error, saying 'TypeError: argument 1 must be pygame.Surface, not list'

Any clue how to fix this?
Edit: here is my code: https://pastebin.com/ugMudCNt

@benni347
Copy link

In the draw_window function u have to use BG_IMGS[0] because you loaded the imgs as a list.
So the new draw_windows function would look like this:

Draws the bird, background, and displays it####

def draw_window(win, bird):

win.blit(BG_IMG[0], (0,0))
bird.draw(win)         
pygame.display.update()

#############################################

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants