#New to coding and I've somehow messed up?

16 messages · Page 1 of 1 (latest)

steady radish
#

I'm very new as well, but you are not showing the part of code where it points you at (line 174 I think)

coral thunder
#

okay ill go back and screenshot it

rancid gazelle
#

We would prefer it if you send code through code blocks over screenshots

#

!code html

fluid auroraBOT
#
Code Formatting

When sharing code with the community, please use the correct formatting for ease of readability.

Example

```html
YOUR CODE HERE
```

Those are back ticks not single quotes, typically the key above TAB

candid glade
#

Oh, I can spot the issue even without any code or screenshots

steady radish
#

And doesn't reference error simply mean that the variable you are using somewhere in your code is not defined? Sorry if that's silly, I'm learning right now as well lol

coral thunder
#
 if(player1State.state == "kenIdle")
     {
         ctx.drawImage(ken, kenIdle[p1Frame].x, kenIdle[p1frame].y,
         kenIdle[p1Frame].w, kenIdle[p1Frame].h, p1X, p1Y, kenIdle[p1Frame].w,
         kenIdle[p1Frame].h);
     }
candid glade
#

You typed p1Frame without the capitalization at some point within your drawPlayer1 function

rancid gazelle
#

Hex op lol

candid glade
#

If you check the errors, it's saying p1frame is not defined, while you use p1Frame as the variable

coral thunder
#

i think i see the problem

steady radish
#

VS Code usually flags it before you even run your code if I'm not mistaken

coral thunder
#

ahhh thankyou guys sooo much ive fixed it and its working now

#

!!!