Traceback (most recent call last):
, line 44, in <module>
fighter_1.move(SCREEN_WIDTH, SCREEN_HEIGHT, screen, fighter_2)
TypeError: Fighter.move() takes 4 positional arguments but 5 were given
i think what the solution has to do with my fighter_1.mov vs def mov
I think the issue is that you have five arguments here
and four here
they need to be the same number
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
This error is strange, because it shouldn’t occur here, move method takes 5 positional arguments (but one is implied and is not passed explicitly - the object instance). So I cannot reproduce encountering it.
Could it be possible that file with Fighter class was modified, but not yet saved when you were running it?