Braces around Scalar Initializer for type 'byte' ERROR

I’m currently trying to make a 2D array, of 8x8 for a LED matrix, as the original code warants 8x10.
I have the code:

#define E  { \
    {0, 1, 1, 1, 1, 1, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 1, 1, 1, 1, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 1, 1, 1, 1, 1, 0}  \
}
const int numPatterns = 8;//this is the number of patterns you want to display
byte patterns[numPatterns][8]={E,E,E,E,E,E,E,E};// the patterns order

Except I get that error, any help would be much appreciated!

E is the definition for a 2 dimensional array initialiser.
Patterns is declared as a 2 dimensional array, but you initialise it as an array of 2 dimensional arrays (E), or, in other words a 3 dimensional array, and you cannot initiate a 2 dimensional array with 3 dimensional values, hence the error.

This solves the immediate compile issue:

byte patterns[numPatterns][8][8] ={E,E,E,E,E,E,E,E};// the patterns order

But I’m not sure if it solves your overall problem.

E is not the definition of a two dimensional array.

E is defining a textual substitution for the C preprocessor, which looks like a set of initializers for an array, but isn’t, unless you actually declare an array, which you cannot do in a #define.

Furthermore, when you use E later, you are creating an initializer for a three dimensional array, which the array declaration needs to match correctly.

If you actually want a 2-d array, you could try this:

byte patterns[ num_patterns ][8] = E  ;

Considering only the textual substitution aspect, that should work. But it seems rather pointless to go about it the way you are trying to do, anyway.