Im very new to this can i get some help please

hi, I have pretty much no experience and need help. I'm making code for a predator gauntlet countdown timmer.
I have an
Arduino mega
4 74hc595 running on separate pins so they can be programmed individually
all running 8 LEDs

what I want my outcome to be is 4 groups of 8 LEDs set in predator like symbol
all groups of lights start together so it looks like a countdown clock
the first group flashes randomly 5 times
second group 10 times
thrid 15
and forth 20

as I said I'm very new and have no clue if I'm even close to something
here is what I have so far
all programming was done in void so the event only happens once
and please dumb it down for me

#include <HC595.h>

const int buzzer = 16;
int previousMillis;
int i;
int chipCount1;
const int buttonState = 0;
int latchPin1 = 3;
int clockPin1 = 4;
int dataPin1 = 5;

int latchPin2 = 6;
int clockPin2 = 7;
int dataPin2 = 8;

int latchPin3 = 9;
int clockPin3 = 10;
int dataPin3 = 11;

int latchPin4 = 12;
int clockPin4 = 13;
int dataPin4 = 14;

//Constructor
HC595 ledArray(chipCount1, latchPin1, clockPin1, dataPin1);

int delayMs = 1000;
int lastPin = ledArray.lastPin();

void oddsOn() {
for (int i = 0 ; i <= lastPin ; i += 2) {
ledArray.setPin(i, ON);

const int buzzer = 53;

}
int delayMs = 1000;
int lastPin = ledArray.lastPin();

void setup ()

for (i = 0; i < 5; i++);
pinMode (latchPin1, OUTPUT) ;
pinMode (dataPin1, OUTPUT) ;
pinMode (clockPin1, OUTPUT) ;
previousMillis = millis();
randomSeed(analogRead(A0)); // Nothing connected to A0
ledArray.reset();

for (i = 0; i < 10; i++);
pinMode (latchPin2, OUTPUT) ;
pinMode (dataPin2, OUTPUT) ;
pinMode (clockPin2, OUTPUT) ;
previousMillis = millis();
randomSeed(analogRead(A0)); // Nothing connected to A0
ledArray.reset();

for (i = 0; i < 15; i++);
pinMode (latchPin2, OUTPUT) ;
pinMode (dataPin2, OUTPUT) ;
pinMode (clockPin2, OUTPUT) ;
previousMillis = millis();
randomSeed(analogRead(A0)); // Nothing connected to A0
ledArray.reset();

for (i = 0; i < 20; i++);
pinMode (latchPin4, OUTPUT) ;
pinMode (dataPin4, OUTPUT) ;
pinMode (clockPin4, OUTPUT) ;
tone (buzzer, 1000) ;
previousMillis = millis();
randomSeed(analogRead(A0)); // Nothing connected to A0

}
}

What do you think happens here?

(The same fault occurs several times)

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

What I’ve seen online it’s to repeat the code a set amount of times

Your code repeats the final semicolon a given number of times.
Or it should, if the compiler hasn't decided the code is pointless, and, optimised it away altogether.

Like I said I have no clue what I’m doing

The IDE has many worked examples built in.

(We have no idea what you're trying to do either)

And that’s why I’m here looking for help

So, help us to help you, and tell us what you want your code to do.

4 groups of 8 LEDs set up in 4 predator like symbol
all groups of lights start together so its like a countdown clock
the first group flashes randomly 5 times then stop
second group running same time randomly 10 times then stops
thrid randomly at same time 15 times then stops
and forth randomly 20 times then end of program

A what?

The movie predator I will set 8 LEDs up in the shape of a 4 symbol from the movie

Have you tried any examples associated with the shiftOut function?

You appear to have written a single blob of code to do everything you want, and expected it all to work.

A few examples I’ve found will run all 4 groups but I want the to stop at a set amount of time

You're missing a { between the ) after setup, and the f of for

Is there any point fixing that if all the code is rubbish

Well, it's a start.

I can easily make all 4 groups flash randomly with no end. But that’s not what I’m after

Ok, so post that code.
In code tags.


/*
 * Turns on half of the leds,
 * then randomly toggles all the leds
 */
#include <HC595.h>


const int chipCount = 4;  // Number of serialy connected 74HC595 (8 maximum)
const int latchPin = 4;  // Pin ST_CP (12) of the 74HC595
const int clockPin = 3;  // Pin SH_CP (11) of the 74HC595
const int dataPin = 2;   // Pin DS (14) of the 74HC595


//Constructor
HC595 ledArray(chipCount,latchPin,clockPin,dataPin);

int delayMs = 1000;
int lastPin = ledArray.lastPin();

void oddsOn() {
  for (int i = 0 ; i <= lastPin ; i+=2) {
    ledArray.setPin(i, ON);
  }
}

void setup() {
  randomSeed(analogRead(A0));  // Nothing connected to A0
  ledArray.reset();
  oddsOn();
}

void loop() {
  ledArray.setPin(random(0,lastPin+1), TOGGLE);
  delay(delayMs);
}