+ 4
What is wrong in my code?
please tell..it is my first game https://code.sololearn.com/WNSCHO6hvz1v/?ref=app
2 Answers
+ 4
It would be a lot easier if everything wasn't crammed into single lines of code..
It looks like there's lots of errors here though. Most of it is spacing. Line 19 you have:
functionset_game_speed
add a space between the function name and the function keyword. Similar thing on line 2.
Also right at the top, pretty sure there should be a space between !documentTYPE and html.
I can't tell but it also looks like there's an extra random semi-colon? Line 15.
+ 3
You have deleted your code linked in question since the first answer ^^
I hope this thread will not follow the same way, as some people have doing effort to decrypt your code :P
In addition to the lack of spaces (all function declaration) and the random semi-colon:
+ the doctype is malformed
<!--<documentTYPEhtml>-->
<!DOCTYPE html>
+ the .fillStyle is an attribute, not a function
// ctx.fillStyle("#ffffff");
ctx.fillStyle = "#ffffff";
+ there is a missing semicolon
// dir = queue.pop()map[dir[0]][dir[1]] = 0;
dir = queue.pop();
map[dir[0]][dir[1]] = 0;
+ there's an unexpected closing brackets at end
I guess I'm forgot somes non blocking missing semi-colons and so on...
Check this copy fixed (and spaced/indented :P):
https://code.sololearn.com/W7CaJGwk0c0h/#js
But it seems to not still working, even obvious mistake are fixed ;)