Jslint is returning an odd error to a very annoying section of code I've copied from my textbook. Here is how the code was in the book:
....
{
for(var column = 0; column < COLUMNS; column++)
{
var currentTile = levelMap[row][column];
if(currentTile !== EMPTY)
and that threw up a bunch of errors, like you cant assign a value of 0 to undefined or whatever. so i switched the var statements around like this...
{var row = 0;
var column=0;
for(row < ROWS; row++;)
{
for( column < COLUMNS; column++;)
{
var currentTile = levelMap[row][column];
if(currentTile !== EMPTY)
{
so having it this way- it works now. (sort of...chrome doesnt throw up bugs but its not working well. things are not displaying in my game) but if i run it through jslint i get this error.
Unexpected ')'.
for(row < ROWS; row++;)
taking the ; off of row++ breaks it. taking the ) out breaks it.
And even though it runs, it doesn't run right. I can provide more information if you'd like, thought i'd just keep it on the shorter end .
im an idiot, apparently, cause i cant figure it out.
for(; row < ROWS; row++)