Trying to use a 74HC595 Serial Register to control a display PLZ HELP

Trying to use a 74HC595 in this example

for a project in my class and I keep getting this error and I do not know why
exit status 1
expected ‘}’ before numeric constant

const int latchPin = 12; // pin 12 connected to ST_CP of the 74HC595
const int clockPin = 8;  // pin 8 connected to SH_CP of the 74HC595
const int dataPin = 11;  // pin 11 connected to DS of 74HC595
//display 0,1,2,3,4,5,6,7,8,9,A,b,c,d,E,F
int Array[] = {252, 96. 218, 242, 102, 182, 190, 224, 254, 246, 238, 62, 156, 122, 158, 142};

void setup() {
  // put your setup code here, to run once:
  // set pins to ouput
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  // loop from 0 to 256
  for(int num = 0; num < 16; num++)
  {
    digitalWrite(latchPin, LOW); // set latch pin to low and hold at low for as long as transmission lasts
    shiftOut(dataPin,clockPin,MSBFIRST,Array[num];
    // return the latch pin to high to signal that it no longer needs to listen for information
    digitalWrite(latchPin, HIGH);
    delay(1000);  // wait for one second
  }
}

You should post the complete error message. It included line numbers and all that to make it easy to find. Don't paraphrase.

IN this case though it stands out like a sore thumb.

shiftOut(dataPin,clockPin,MSBFIRST,Array[num];

Looks like you lost something on the end there. Every ( needs a ).

Oh wait, I hit the next error. The one you posted was here:

int Array[] = {252, 96. 218,

One of those commas is a fraud.

here is the complete error message

Arduino: 1.8.5 (Windows 10), Board: “Arduino/Genuino Uno”

sketch_jun09a:5: error: expected ‘}’ before numeric constant

int Array = {252, 96. 218, 242, 102, 182, 190, 224, 254, 246, 238, 62, 156, 122, 158, 142};

^

C:\Users\noah-\Documents\Arduino\sketch_jun09a\sketch_jun09a.ino:5:25: warning: narrowing conversion of ‘9.6e+1’ from ‘double’ to ‘int’ inside { } [-Wnarrowing]

sketch_jun09a:5: error: expected ‘,’ or ‘;’ before numeric constant

sketch_jun09a:5: error: expected declaration before ‘}’ token

int Array = {252, 96. 218, 242, 102, 182, 190, 224, 254, 246, 238, 62, 156, 122, 158, 142};

^

exit status 1
expected ‘}’ before numeric constant

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

and also I fixed the things you pointed out and now its working lol. Im too tired to code lol thanks

  1. // . should be a comma

shiftOut(dataPin,clockPin,MSBFIRST,Array[num]); // closing bracket was missing

Leo…

Wawa:
96. // . should be a comma

shiftOut(dataPin,clockPin,MSBFIRST,Array[num]); // closing bracket was missing

Leo…

Where I’m from, ( and ) are called parenthesis not brackets and brackets are [ and ]

— bill

Sorry, confused with parenthesis after the bracket. Need more coffee. Leo..

The paren after the bracket is needed to match the open paren in shiftOut(