How to fix this error in Pycharm?

Hello, does anyone know how to fix this error?
Th error said:

line 40
    pygame.draw.rect(win,WHITE(0,0, WIDTH, HEIGHT), 5,border_radius = 4)
IndentationError: unexpected indent

its like an error has come in line 40 in the code below

#Aeroblasters
import pygame


pygame.init()
Screen = width,height = 288, 512

info = pygame.display.Info()
width = info.current_w
height = info.current_h

if width >= height:
    win =  pygame.display.set_mode(Screen, pygame.NOFRAME)
else:
    win = pygame.display.set_mode(Screen, pygame.NOFRAME. pygame.SCALED. pygame.FULLSCREEN)

#Colors

WHITE = (255,255,255)
BLUE = (30, 144, 255)

#IMAGES

bg = pygame.image.load('Documenten/bg.avif.png')

running = True
while running:

    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K.ESCAPE or event.key == pygame.K.q:
                running= False

win.blut(bg, (0,0))


    pygame.draw.rect(win,WHITE(0,0, WIDTH, HEIGHT), 5,border_radius = 4)
    pygame.display.update()


pygame.quit()

Does this help? Python Indentation

Thank you for the link, but it didnt help. I still get the error. Any other solution maybe or where I did it wrong in line 40?

You should just need to un-indent line 40, as well as the line below it.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.