Problem with if statement controlling 8x8 matrix

 if (x = 0);

Two problems right there

if (x = 1)

Only one there

Please remember to use code tags when posting code.