code problem for an 8x8 led matrix MAX7219 module

Hi all!
arduinofreaklol here!

I have an 8x8 LED Matrix Display MAX7219 module (sorry! not able to post pics at the moment!)
and i made an awesome project with it! The Problem is that it has an error with the code for the display module.

Here is the code:

#include <LedControl.h>

LedControl lc=LedControl(12, 11, 10, 1); 
//pin DIN = 12
//pin CS = 10
//pin CLK = 11

unsigned long Delay = 200;

long randomnumber;

int randombinaryblock;

void setup() {
  lc.shutdown(0, false);
  lc.setIntensity(0, 5);
  lc.clearDisplay(0);
}

void loop() {
  RANDOM_SOUND();
  RANDOM_BINARY();
  delay(40);
}

void RANDOM_SOUND(void) {
  randomnumber = random(10, 2000);
  tone(13, randomnumber);
}

void RANDOM_BINARY(void) {
  byte randombinary1[] =
  {
    B00111010,
    B10011100,
    B01000111,
    B11010100,
    B10110001,
    B00010110,
    B01111001,
    B11000101
  };
  
  byte randombinary2[] = 
  {
    B10010110,
    B11100100,
    B01101110,
    B00111011,
    B11110010,
    B01101011,
    B00101111,
    B01011100
  };
  
  byte randombinary3[]
  {
    B01110110,
    B10011100,
    B00000110,
    B01100001,
    B11100101,
    B11011110,
    B11011111,
    B01100111
  };
  
  byte randombinary4[]
  {
    B00001110,
    B11010101,
    B10101110,
    B01110000,
    B01010111,
    B00011100,
    B10101011,
    B00000101
  };
  
  byte randombinary5[]
  {
    B01010111,
    B11101011,
    B00111010,
    B11100011,
    B11001111,
    B11101100,
    B01010101,
    B11100010
  };
  
  randombinaryblock = randombinary1[] || randombinary2[] || randombinary3[] || randombinary4[] || randombinary5[];
  
  if(randombinaryblock = randombinary1[]) {
    RANDONBINARY_1();
  }
  
  if(randombinaryblock = randombinary2[]) {
    RANDONBINARY_2();
  }
  
  if(randombinaryblock = randombinary3[]) {
    RANDONBINARY_3();
  }
  
  if(randombinaryblock = randombinary4[]) {
    RANDONBINARY_4();
  }
  
  if(randombinaryblock = randombinary5[]) {
    RANDONBINARY_5();
  }
}

void RANDONBINARY_1(void) {
  for(int i = 0; i < 8; i++) {
    lc.setRow(0, i, randombinary1[i]);
  }
}

void RANDONBINARY_2(void) {
  for(int i = 0; i < 8; i++) {
    lc.setRow(0, i, randombinary2[i]);
  }
}

void RANDONBINARY_3(void) {
  for(int i = 0; i < 8; i++) {
    lc.setRow(0, i, randombinary3[i]);
  }
}

void RANDONBINARY_4(void) {
  for(int i = 0; i < 8; i++) {
    lc.setRow(0, i, randombinary4[i]);
  }
}

void RANDONBINARY_5(void) {
  for(int i = 0; i < 8; i++) {
    lc.setRow(0, i, randombinary5[i]);
  }
}

This is the error:

random_binary_output.ino: In function 'void RANDOM_BINARY()':
random_binary_output:92: error: expected primary-expression before ']' token
random_binary_output:92: error: expected primary-expression before ']' token
random_binary_output:92: error: expected primary-expression before ']' token
random_binary_output:92: error: expected primary-expression before ']' token
random_binary_output:92: error: expected primary-expression before ']' token
random_binary_output:94: error: expected primary-expression before ']' token
random_binary_output:98: error: expected primary-expression before ']' token
random_binary_output:102: error: expected primary-expression before ']' token
random_binary_output:106: error: expected primary-expression before ']' token
random_binary_output:110: error: expected primary-expression before ']' token
random_binary_output.ino: In function 'void RANDONBINARY_1()':
random_binary_output:117: error: 'randombinary1' was not declared in this scope
random_binary_output.ino: In function 'void RANDONBINARY_2()':
random_binary_output:123: error: 'randombinary2' was not declared in this scope
random_binary_output.ino: In function 'void RANDONBINARY_3()':
random_binary_output:129: error: 'randombinary3' was not declared in this scope
random_binary_output.ino: In function 'void RANDONBINARY_4()':
random_binary_output:135: error: 'randombinary4' was not declared in this scope
random_binary_output.ino: In function 'void RANDONBINARY_5()':
random_binary_output:141: error: 'randombinary5' was not declared in this scope
expected primary-expression before ']' token

how do i fix this?

arduinofreaklol

  randombinaryblock = randombinary1[] || randombinary2[] || randombinary3[] || randombinary4[] || randombinary5[];

What the heck is this?

Your code had many errors. The following compiles, I do not know if it will work. Note that I changed the library to “LedControlMS”, since the one you are using would not compile on my computer - change it back to “LedControl” if that works for you.

#include "LedControlMS.h"

LedControl lc=LedControl(12, 11, 10, 1);

//pin DIN = 12
//pin CS = 10
//pin CLK = 11

unsigned long Delay = 200;

long randomnumber;

int randombinaryblock;

void setup() {
  lc.shutdown(0, false);
  lc.setIntensity(0, 5);
  lc.clearDisplay(0);
}



void RANDOM_SOUND(void) {
  randomnumber = random(10, 2000);
  tone(13, randomnumber);
}


byte randombinary1[] =
{
  B00111010,
  B10011100,
  B01000111,
  B11010100,
  B10110001,
  B00010110,
  B01111001,
  B11000101
};

byte randombinary2[] =
{
  B10010110,
  B11100100,
  B01101110,
  B00111011,
  B11110010,
  B01101011,
  B00101111,
  B01011100
};

byte randombinary3[]=
{
  B01110110,
  B10011100,
  B00000110,
  B01100001,
  B11100101,
  B11011110,
  B11011111,
  B01100111
};

byte randombinary4[]=
{
  B00001110,
  B11010101,
  B10101110,
  B01110000,
  B01010111,
  B00011100,
  B10101011,
  B00000101
};

byte randombinary5[]=
{
  B01010111,
  B11101011,
  B00111010,
  B11100011,
  B11001111,
  B11101100,
  B01010101,
  B11100010
};

void loop() {
  RANDOM_SOUND();
  // RANDOM_BINARY();
  delay(40);

  randombinaryblock = (int)random(1, 6); //randombinary1[] || randombinary2[] || randombinary3[] || randombinary4[] || randombinary5[];

  if(randombinaryblock == 1) {
    RANDONBINARY_1();
  }

  if(randombinaryblock = 2) {
    RANDONBINARY_2();
  }

  if(randombinaryblock = 3) {
    RANDONBINARY_3();
  }

  if(randombinaryblock = 4) {
    RANDONBINARY_4();
  }

  if(randombinaryblock = 5) {
    RANDONBINARY_5();
  }
}

void RANDONBINARY_1(void) {
  for(int i = 0; i < 8; i++) {
    lc.setRow(0, i, randombinary1[i]);
  }
}

void RANDONBINARY_2(void) {
  for(int i = 0; i < 8; i++) {
    lc.setRow(0, i, randombinary2[i]);
  }
}

void RANDONBINARY_3(void) {
  for(int i = 0; i < 8; i++) {
    lc.setRow(0, i, randombinary3[i]);
  }
}

void RANDONBINARY_4(void) {
  for(int i = 0; i < 8; i++) {
    lc.setRow(0, i, randombinary4[i]);
  }
}

void RANDONBINARY_5(void) {
  for(int i = 0; i < 8; i++) {
    lc.setRow(0, i, randombinary5[i]);
  }
}