Making a value biger after i press the controlor button
Go to solution
Solved by C2dan88,
This error
QuoteTypeError: on_x_press() missing 1 required positional argument: 'angle_count'
Says you are calling on_x_press() function without passing any arguments to it.
Your function definition defines 1 argument angle_count
def on_x_press(self, angle_count):
If you dont need to pass an argument to the function then remove the argument
def on_x_press(self):
angle_count is a property to the MyController class. You need to use self.angle_count in your functions when you need to use it.
To increment its value by 1 you can += operator
def on_x_press(self): print("1") self.angle_count += 1 // increment angle_count by 1
To deincrement the value you can use -= operator
def on_circle_press(self): self.angle_count -= 1
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now