Error MEssages

Hello. Im new to Arduino and am finding some error messages that I cannot resolve. If any of you can help, please do. At the underlined part it says, "expected primary-expression before '(' token"

#include <Sprite.h>
#include <Matrix.h>

// Scoreboard Sketch
// Controls the Arduino Scorboard for fooseball table
// Date :Feb-...2020
// By Charlie

//declare the matric and its pin connections to DIN, CLK, CS
Matrix myMatrix=Matrix(8,4,6,1); //data, clock,load,number of matrixes
int second=1000;
int bluePin=12;
int greenPin=10;
int animationDelay=300;

Sprite number_0=Sprite (3,5
B111,
B101,
B101,
B101,
B111,
);

Sprite number_1 = Sprite (3,5
B010,
B010,
B010,
B010,
B010,
);

Sprite number_2 = Sprite (3,5
B111,
B001,
B111,
B100,
B111,
);

Sprite number_3 = Sprite (3,5
B111,
B001,
B111,
B001,
B111,

Please post your complete program using code tags when you do

#include <Sprite.h>
#include <Matrix.h>

 
 
// Scoreboard Sketch
// Controls the Arduino Scorboard for fooseball table
// Date :Feb-...2020 
// By Charlie


//declare the matric and its pin connections to DIN, CLK, CS
Matrix myMatrix=Matrix(8,4,6,1); //data, clock,load,number of matrixes
  int second=1000;
  int bluePin=12;
  int greenPin=10;
  int animationDelay=300;

  Sprite number_0=Sprite(3,5
   B111,
   B101,
   B101,
   B101,
   B111,
   );}

  Sprite number_1 = Sprite(3,5
   B010,
   B010,
   B010,
   B010,
   B010,
   );}

  Sprite number_2 = Sprite(3,5
   B111,
   B001,
   B111,
   B100,
   B111,
   );}

  Sprite number_3 = Sprite {(3,5
   B111,
   B001,
   B111,
   B001,
   B111,
   );}
  
void setup() {
  Serial.begin(9600); 
  pinMode(bluePin, INPUT_PULLUP);
  pinMode(greenPin, INPUT_PULLUP);
  myMatrix.clear();
}

void loop(){
  myMatrix.clear
  {
  myMatrix.write(1, 1, number_1)
}
  myMatrix.clear();
  myMatrix.write(0,7, HIGH);
  if (digitalRead(bluePin)==LOW && digitalRead(greenPin)==LOW){
    Serial.println ("blueButton and redButton");
  }else{
  if (digitalRead(bluePin)==LOW){
  Serial.println ("redButton");
  delay(second *0.5);
  }
  if (digitalRead(greenPin)==LOW){
  Serial.println ("blueButton");
  delay(second  *0.5);  
  }
  }  -

Something looks very wrong with your declarations of the sprites, although I am not familiar with the library

Sprite number_0 = Sprite(3, 5
                         B111,
                         B101,
                         B101,
                         B101,
                         B111,
                        );
}

At the very least I would expect there to be balanced pairs of brackets

It still doesn't work. Now my code looks something like this. If you can't figure it out, il just ask my teacher if there's any other way to do it. Thanks alot for your help so far.

#include <Sprite.h>
#include <Matrix.h>

 
 
// Scoreboard Sketch
// Controls the Arduino Scorboard for fooseball table
// Date :Feb-...2020 
// By Charlie


//declare the matric and its pin connections to DIN, CLK, CS
Matrix myMatrix=Matrix(8,4,6,1); //data, clock,load,number of matrixes
  int second=1000;
  int bluePin=12;
  int greenPin=10;
  int animationDelay=300;

  Sprite number_0=Sprite (3,5
   B111,
   B101,
   B101,
   B101,
   B111,);

  Sprite number_1=Sprite (3,5
   B010,
   B010,
   B010,
   B010,
   B010,);

  Sprite number_2=Sprite (3,5
   B111,
   B001,
   B111,
   B100,
   B0111,);


  Sprite number_3 = Sprite (3,5
   B111,
   B001,
   B111,
   B001,
   B111,);
  
void setup() {
  Serial.begin(9600); 
  pinMode(bluePin, INPUT_PULLUP);
  pinMode(greenPin, INPUT_PULLUP);
  myMatrix.clear();
}

void loop(){
  myMatrix.clear
  {
  myMatrix.write(1, 1, number_1)
  myMAtrix.write(2, 2, number_2)
}
  myMatrix.clear();
  myMatrix.write(0,7, HIGH);
  if (digitalRead(bluePin)==LOW && digitalRead(greenPin)==LOW){
    Serial.println ("blueButton and redButton");
  }else{
  if (digitalRead(bluePin)==LOW){
  Serial.println ("redButton");
  delay(second *0.5);
  }
  if (digitalRead(greenPin)==LOW){
  Serial.println ("blueButton");
  delay(second  *0.5);  
  }
  }  -
Sprite number_0 = Sprite (3, 5
                          B111,
                          B101,
                          B101,
                          B101,
                          B111,);

I suspect that the last comma should not be there

Are there any examples with the library ?

It still says "expected primary-expression before '(' token". There is an example from the sprite website. (the website example uses letters for the LED display while my code uses numbers.)

#include <Sprite.h>  // Sprite before Matrix
#include <Matrix.h>

//                  DIN, CLK, LOAD, #chips
Matrix myLeds = Matrix(16, 17, 18, 3);

Sprite letter_L = Sprite(5, 8,
  B11000,
  B11000,
  B11000,
  B11000,
  B11000,
  B11000,
  B11111,
  B11111
);
Sprite letter_E = Sprite(5, 8,
  B11111,
  B11111,
  B11000,
  B11110,
  B11110,
  B11000,
  B11111,
  B11111
);
Sprite letter_D = Sprite(6, 8,
  B111100,
  B111110,
  B110111,
  B110011,
  B110011,
  B110111,
  B111110,
  B111100
);
Sprite letter_S = Sprite(5, 8,
  B01110,
  B11111,
  B11000,
  B11110,
  B01111,
  B00011,
  B11111,
  B01110
);
Sprite letter_L = Sprite(5, 8,
  B11000,
  B11000,
  B11000,
  B11000,
  B11000,
  B11000,
  B11111,
  B11111
);

No trailing comma in the example

 Sprite number_0=Sprite (3,5    ⬅︎ missing comma
   B111,
   B101,
   B101,
   B101,
   B111,);    ⬅︎ extra comma
   B111,);    ⬅︎ extra comma

Let's hope he/she takes more notice of you than he/she did of me :slight_smile: