+ 1

Flappy bird problem

When trying to make the red circle in the flappy bird game game for the Java script practice I canā€™t because ā€œ TypeError: null is not an object (evaluating 'canvas.getContext') at Line: 5ā€

29th Jan 2022, 10:40 PM
Matthew Evans
24 Respostas
+ 7
Copy the code into a script on sololearn playground and share the script Without seeing the code, we can't determine what is wrong
29th Jan 2022, 11:46 PM
Lisa
Lisa - avatar
+ 2
you are totally just randomly choosing file types.šŸ˜…
30th Jan 2022, 1:26 AM
Bob_Li
Bob_Li - avatar
+ 2
You'll get the hang of it, no problem. The red circle is not in your code. Even the count is not displayed yet. you'll get there.
30th Jan 2022, 1:37 AM
Bob_Li
Bob_Li - avatar
+ 1
Please link your code so we can help you
29th Jan 2022, 11:00 PM
Lisa
Lisa - avatar
+ 1
Oh lol i just thoght a web file was referning to what code i used, sorry
30th Jan 2022, 1:34 AM
Matthew Evans
0
It says i have no code bits. Can i not share it if its part of the lessons
29th Jan 2022, 11:37 PM
Matthew Evans
0
you can create a new web file then copy paste the code to it.
30th Jan 2022, 1:12 AM
Bob_Li
Bob_Li - avatar
30th Jan 2022, 1:13 AM
Matthew Evans
0
not a java file, a web html file.
30th Jan 2022, 1:14 AM
Bob_Li
Bob_Li - avatar
0
So copy paste that in html?
30th Jan 2022, 1:15 AM
Matthew Evans
0
you can recreate it by copy pasting the parts in their correct tabs. html in html, css in css, javascript in javascript.
30th Jan 2022, 1:18 AM
Bob_Li
Bob_Li - avatar
0
I think i understand
30th Jan 2022, 1:18 AM
Matthew Evans
0
Looking at what you posted, I think the problem is in your html. the button id for jump should be id="jump" not id= jump
30th Jan 2022, 1:21 AM
Bob_Li
Bob_Li - avatar
0
Ok thank you do you still want me put the other stuff
30th Jan 2022, 1:22 AM
Matthew Evans
0
if its working now. no need.
30th Jan 2022, 1:23 AM
Bob_Li
Bob_Li - avatar
0
The red circle still didnt show up
30th Jan 2022, 1:24 AM
Matthew Evans
30th Jan 2022, 1:24 AM
Matthew Evans
0
https://code.sololearn.com/cI2Nnhhg1fJs/?ref=app
30th Jan 2022, 1:25 AM
Matthew Evans
30th Jan 2022, 1:25 AM
Matthew Evans
0
The code in the tutorail is in 3 diffrent things so i thought you ment to send it peice by peice and not all together. I only started yesterday so i dont know much of what im doing, which is why im getting help
30th Jan 2022, 1:29 AM
Matthew Evans