Arnav Avuturu
Arnav Avuturu

Reputation: 11

TypeError: integer argument expected, got float while building game with pygame

I was trying to make a game in pygame but it was showing me an error. The error is:

(square_width*6,square_height*2))
TypeError: integer argument expected, got float

Please help me in solving this problem

Upvotes: 0

Views: 198

Answers (1)

moe asal
moe asal

Reputation: 582

with not so much code and info given, the best answer to this question is:

replace your code with this. Since your code is raising a type error, then you gave wrong input. change your input to int instead of float

(int(square_width*6),int(square_height*2))

Upvotes: 2

Related Questions