Pygame-Cameras icon indicating copy to clipboard operation
Pygame-Cameras copied to clipboard

integer argument expected, got float

Open peejcodes opened this issue 1 year ago • 1 comments

Tried to run this and got this error:

Traceback (most recent call last): File "/storage/emulated/0/python/Github/Pygame-Cameras/camera.py", line 206, in camera_group.custom_draw(player) File "/storage/emulated/0/python/Github/Pygame-Cameras/camera.py", line 170, in custom_draw scaled_surf = pygame.transform.scale(self.internal_surf,self.internal_surface_size_vector * self.zoom_scale) TypeError: integer argument expected, got float

I tried some print statements to check what could be a float but didn't see anything.

peejcodes avatar Jul 11 '23 14:07 peejcodes

And what if you write scaled_surf = pygame.transform.scale(self.internal_surf,int(self.internal_surface_size_vector * self.zoom_scale)) ?

LucasColas avatar Apr 29 '24 08:04 LucasColas