Problem with if statement controlling 8x8 matrix

  if (x=0);

You clearly are not listening. If statements do not end with ;. The equality operator is ==, not =.