Skip to content Skip to sidebar Skip to footer

Typeerror: '>' Not Supported Between Instances Of 'method' And 'int', But In This Case The 'method' Is A Number

I'm new to creating videogames with python and I got this error: Traceback (most recent call last): File '/home/barbieri/pong.py', line 75, in ball.setx(ball.x

Solution 1:

Are you sure your code looks like this

if ball.ycor() > 290:

and not like this

ifball.ycor>290:

because if ycor is defined like this

classball():defycor(self):
        ...

and you try to access it like this

ifball.ycor>290:

then you will get this error

'>'not supported between instances of'method'and'int'

Post a Comment for "Typeerror: '>' Not Supported Between Instances Of 'method' And 'int', But In This Case The 'method' Is A Number"