I currently have a bit of code that adds a certain amount of points to a plyers score:
points = 5
player1 = 0
float(points)
float(player1)
player1 += points
points = 0
The problem is when I run this I get this error:
TypeError: unsupported operand type(s) for +=: 'int' and 'str'
At first, I thought it had to do with the data types of the variables, points and player1 but I have a float function right before it. Also just for debugging purposes I wrote a bool statement print(bool(float(var))) to check if it was floating correct and it wasn't. The points variable floated correctly but it was saying that player1 was not a float. Any ideas on why this is happening?

float(points)doesn't changepoints. It should bepoints = float(points)points = 5makes it anint, notstr.