我的pygame代碼有問題。Python錯誤:unident不匹配任何外部標識級別
import pygame
from pygame.locals import *
ANCHO_MAPA = 800
ALTO_MAPA = 600
pos_x = 0
pygame.init()
screen = pygame.display.set_mode((ANCHO_MAPA, ALTO_MAPA))
pygame.display.set_caption("Gercho")
tile = pygame.image.load('ima/0.png').convert_alpha()
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
for x in range(ALTO_MAPA):
screen.blit(tile, (1, x))
pygame.display.flip()
當我嘗試它,我得到這個錯誤。有什麼問題?
顯示錯誤信息msg – avasal 2013-02-22 17:57:29
一致使用四個空格,無選項卡。確保您的編輯器自動執行此操作! – 8765674 2013-02-22 18:00:58
如果你在一個地方點擊標籤,並在另一個地方按空格鍵4次,即使它們看起來相同,但你正在混合標識 – Drewdin 2013-02-22 19:21:15