How to fix this DeprecationWarning

前端 未结 2 1209
挽巷
挽巷 2020-12-21 11:19

DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using int is deprecated, and may be removed in a fut

2条回答
  •  执念已碎
    2020-12-21 11:59

    The message appears also with explicit conversions so, to be safe do:

    a = round(x)
    b = round(y)
    win.blit(playerStand, (a, b))
    

    W1JGH

提交回复
热议问题