+ 11
[SOLVED] Why this code is not working?
This code does not show any output: https://code.sololearn.com/W7ypjzOxJ8cH. What is the problem?
16 Respuestas
+ 3
@anjali shah wrote: << what you want to print in this code >>
Once time all errors corrected (spaces are the most numerous, but there's a lot of other mistakes), the output should be the animated drawing of a kitty... that's not obvious at all, because commentaries inside code are not really understandable (at least for people with not good english as me, but it seems that's not written in better english than better css ^^
@Arushi Singhania wrote: << I try removing some spaces and add html tag but no improvement. >>
The lack of <html> tag is not a blocking error, and the spaces in too much are not the only errors: you must try removing ALL bad spaces first, then attempt to debug step by step (and probably correct some bad spaces again, as there's too much to be fixed all at once) to understand what don't work and how to correct...
I could post the fixed (and improved) working version of your code, but it would not be useful for you to improve your skill, all the more that I cannot explain each of your too much numerous mistakes and bad practices ^^
Anyway, how have you write this code with as much errors but with good logical, as the drawing is perfect when errors corrected?
The key for writting code is to test little part until it will work, before coding more stuff: debugging is quite more difficult on big codes than on little one, especially with Css codes (which are not always obvious to understand the priorities rules -- the way of weight of selectors are compared to decide wich one should overide wich other: not necessarly last declarated is remaining)... That's why I suggest to debug 'step by step', meaning in your code case, trying to make work the draw of only one eye, then both, then the nose, and so on (and why not starting by make them displaying work, before trying to animate).
+ 6
<html> missing
+ 3
If you open this code on the web browser, you will see all the error.
Copy/Past from web/file can add some invisible character spaces.
As Henry say, there is alot of unnecessary spaces in the CSS code.
Example:
width: 34px; /* Ok */
width: 34 px; /* Bad */
width: 34%; /* Ok */
width: 34 %; /* Bad */
+ 3
@visph thanks bro. I will keep your suggestions in mind while developing codes.
+ 3
@visph I am debugging
it. It's about to complete but due to final exams I am not able to debugg for some days.
+ 3
@Visph ok, thanks.
+ 2
@Jackson stop making nonsense.
+ 2
visph Can you post the link of corrected version of code ?? I am unable to fully correct it.
+ 2
visph Thanks a lot !!!!
+ 1
I try removing some spaces and add html tag but no improvement.
+ 1
You have errors in css file.
Compare all ID and class in HTML.
Reformat your code, and don't use text editor, much better is IDE software ( for e.g. PhpStorm ).
All selectors and selectors who have _ or -, in value, property, between value and semicolon, in keyframes remove empty space .
In HTML remove </meta>.
+ 1
Have you succeeded to debug your Doreamon code ?
+ 1
Feel free to ask me to publish and post the link of my fixed and improved version, even that's better for your skill improvment if you do it yourself ;)
0
what you want to print in this code
- 7
Because you are using c++ instead of java
#JavaGang
upvote if you java