# New coder seeking help on passion project

**URL:** <https://forum.freecodecamp.org/t/new-coder-seeking-help-on-passion-project/551871>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [September 7, 2022, 7:15pm UTC](https://forum.freecodecamp.org/t/new-coder-seeking-help-on-passion-project/551871 "2022-09-07T19:15:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mattdcodespoorly](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/mattdcodespoorly/32/282722_2.png) [@Mattdcodespoorly](https://forum.freecodecamp.org/u/Mattdcodespoorly)\
**Post date:** [September 7, 2022, 7:15pm UTC](https://forum.freecodecamp.org/t/new-coder-seeking-help-on-passion-project/551871/1 "2022-09-07T19:15:25Z")

</div>

Ive been following a tutorial to make a streetfighter clone and im so confused at this error message

(i dont know if people copy and paste all of their code but its all on my replit ([https://replit.com/@MattDooman/support#main.py](https://replit.com/@MattDooman/support#main.py))

```auto
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

fighter\_1.mov is this

```auto
    #move fighters
    fighter_1.move(SCREEN_WIDTH, SCREEN_HEIGHT, screen, fighter_2)
    #fighter_2.move()

    fighter_1.draw(screen)
    fighter_2.draw(screen)

    #event handler

```

and def mov is

```auto
(class Fighter():
    def __init__ (self, x, y):
        self.rect = pygame.Rect ((x, y, 80, 180))
        self.vel_y = 0
        self.jump = False
        self.attack_type = 0

    def move(self, screen_width, screen_height, surface, target):
        SPEED = 10
        GRAVITY = 2
        dx = 0
        dy = 0

```

and

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [September 7, 2022, 7:28pm UTC](https://forum.freecodecamp.org/t/new-coder-seeking-help-on-passion-project/551871/2 "2022-09-07T19:28:54Z")

</div>

> [@Mattdcodespoorly](#):
>
> `def move(self, screen_width, screen_height, surface, target):`

I think the issue is that you have five arguments here

> [@Mattdcodespoorly](#):
>
> `fighter_1.move(SCREEN_WIDTH, SCREEN_HEIGHT, screen, fighter_2)`

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.

 ![Pre-formatted-text](https://global.discourse-cdn.com/freecodecamp/original/3X/1/b/1b18854f1059217f29370444396145cc3a0cd8ae.gif)

See [this post](https://forum.freecodecamp.org/t/forum-code-formatting/25574) to find the backtick on your keyboard.  
**Note:** Backticks (`) are not single quotes (').

---

<div class="post-metadata">

**Author:** ![Mattdcodespoorly](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/mattdcodespoorly/32/282722_2.png) [@Mattdcodespoorly](https://forum.freecodecamp.org/u/Mattdcodespoorly)\
**Post date:** [September 7, 2022, 7:30pm UTC](https://forum.freecodecamp.org/t/new-coder-seeking-help-on-passion-project/551871/3 "2022-09-07T19:30:45Z")

</div>

ok so how would i edit them to be the same?

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [September 7, 2022, 7:32pm UTC](https://forum.freecodecamp.org/t/new-coder-seeking-help-on-passion-project/551871/4 "2022-09-07T19:32:00Z")

</div>

you can delete an argument from a function with the backspace

or you can add an argument by typing it

---

<div class="post-metadata">

**Author:** ![bradtaniguchi](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bradtaniguchi/32/110427_2.png) [@bradtaniguchi](https://forum.freecodecamp.org/u/bradtaniguchi)\
**Post date:** [September 7, 2022, 7:51pm UTC](https://forum.freecodecamp.org/t/new-coder-seeking-help-on-passion-project/551871/5 "2022-09-07T19:51:29Z")

</div>

> [@ILM](#):
>
> and four here
> 
> they need to be the same number

Python accepts the `self` argument automatically, so this shouldn’t be an issue.

However I can’t run the repl due to `fighter` not being a `.py` file it seems, so I can’t confirm.

---

<div class="post-metadata">

**Author:** ![sanity](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sanity/32/378897_2.png) [@sanity](https://forum.freecodecamp.org/u/sanity)\
**Post date:** [September 7, 2022, 7:51pm UTC](https://forum.freecodecamp.org/t/new-coder-seeking-help-on-passion-project/551871/6 "2022-09-07T19:51:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [September 7, 2022, 7:52pm UTC](https://forum.freecodecamp.org/t/new-coder-seeking-help-on-passion-project/551871/7 "2022-09-07T19:52:50Z")

</div>

> [@bradtaniguchi](#):
>
> Python accepts the `self` argument automatically, so this shouldn’t be an issue.

you are right! sorry, the scattered snippets confused me

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [March 9, 2023, 7:53am UTC](https://forum.freecodecamp.org/t/new-coder-seeking-help-on-passion-project/551871/8 "2023-03-09T07:53:31Z")

</div>

Closed on March 9, 2023, 7:53am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
