0
私はPyGameを使い始めたばかりですが、失ったときにメッセージを表示するようにしていますが、エラーが戻ってきます。PyGameエラー:RGBA引数
red = (2555, 0, 0)
font = pygame.font.SysFont(None, 25)
def message_to_screen(msg,color):
screen_text = font.render(msg, True, color)
gameDisplay.blit(screen_text, [display_width/2, display_height/2])
--etcなど
message_to_screen("You Lose", red)
pygame.display.update()
time.sleep(2)
正確なエラーメッセージは、私がオンライン任意の答えを見つけることができません
screen_text = font.render(msg, True, color)
TypeError: Invalid foreground RGBA argument
です。助けてください!
各チャネルの範囲は0〜255です.2555が大きすぎます。 – Arkia