• 카테고리

    질문 & 답변
  • 세부 분야

    게임 프로그래밍

  • 해결 여부

    미해결

공이 쪼개지지 않고 1개가 작아지기만 합니다(에러메세지)

20.09.28 16:54 작성 조회수 495

0

공이 안쪼개지고 아래 실행칸에는 이런 메세지가 뜨는데요

뭐가 문제일까요??

c:/Users/user/Desktop/python work space/pygame_project/5_ball_division.py:160: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is 

deprecated, and may be removed in a future version of Python.

  character_rect.left = character_x_pos

c:/Users/user/Desktop/python work space/pygame_project/5_ball_division.py:171: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is 

deprecated, and may be removed in a future version of Python.

  ball_rect.top = ball_pos_y

c:/Users/user/Desktop/python work space/pygame_project/5_ball_division.py:246: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is 

deprecated, and may be removed in a future version of Python.

  screen.blit(ball_images[ball_img_idx], (ball_pos_x, ball_pos_y)) # 공 이미지 그려주기        

c:/Users/user/Desktop/python work space/pygame_project/5_ball_division.py:250: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is 

deprecated, and may be removed in a future version of Python.

  screen.blit(character, (character_x_pos, character_y_pos))

답변 1

답변을 작성해보세요.

0

uki020226님의 프로필

uki020226

2021.03.09

Implicit conversion to integers using __int__ is 

deprecated, and may be removed in a future version of Python.

이렇게 적혀있네요. 잘 읽어봐요. 이게 답이네요. 

애초에  __int__ 는 쓰인적이 없어요. 이건 읽어볼 생각도 안하고 계신거 같은데,,, 오류가 뜨면 그냥 왜 안되지 하지 말고 그 오류 를 읽어봐요.