#New to coding and I've somehow messed up?
16 messages · Page 1 of 1 (latest)
okay ill go back and screenshot it
We would prefer it if you send code through code blocks over screenshots
!code html
Oh, I can spot the issue even without any code or screenshots
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
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);
}
spoilers
You typed p1Frame without the capitalization at some point within your drawPlayer1 function
Hex op lol
If you check the errors, it's saying p1frame is not defined, while you use p1Frame as the variable
i think i see the problem
VS Code usually flags it before you even run your code if I'm not mistaken