expected primary-expression before ')' token

Hi, expected primary-expression before ')' token error keeps appearing when trying to verify at ChangePalettePeriodically(); section of this code. Can anyone help me to identify why this is occurring. I'm quite sure its a rogue { or } but very confused.

Thanks in advance

//START OF CODE IF NO DMX RECIEVED


    ChangePalettePeriodically();
    
    static uint8_t startIndex = 0;
    startIndex = startIndex + 1; /* motion speed */
    
    FillLEDsFromPaletteColors( startIndex);
    
    FastLED.show();
    FastLED.delay(1000 / UPDATES_PER_SECOND);
}

void FillLEDsFromPaletteColors( uint8_t colorIndex)
{
    uint8_t brightness = 255;
    
    for( int i = 0; i < NUM_LEDS; i++) {
        leds[i] = ColorFromPalette( currentPalette, colorIndex, brightness, currentBlending);
        colorIndex += 3;
    }
}


// There are several different palettes of colors demonstrated here.
//
// FastLED provides several 'preset' palettes: RainbowColors_p, RainbowStripeColors_p,
// OceanColors_p, CloudColors_p, LavaColors_p, ForestColors_p, and PartyColors_p.
//
// Additionally, you can manually define your own color palettes, or you can write
// code that creates color palettes on the fly.  All are shown here.

void ChangePalettePeriodically()
{
    uint8_t secondHand = (millis() / 1000) % 60;
    static uint8_t lastSecond = 99;
    
    if( lastSecond != secondHand) {
        lastSecond = secondHand;
        if( secondHand ==  0)  { currentPalette = RainbowColors_p;         currentBlending = LINEARBLEND; }
        if( secondHand == 10)  { currentPalette = RainbowStripeColors_p;   currentBlending = NOBLEND;  }
        if( secondHand == 15)  { currentPalette = RainbowStripeColors_p;   currentBlending = LINEARBLEND; }
        if( secondHand == 20)  { SetupPurpleAndGreenPalette();             currentBlending = LINEARBLEND; }
        if( secondHand == 25)  { SetupTotallyRandomPalette();              currentBlending = LINEARBLEND; }
        if( secondHand == 30)  { SetupBlackAndWhiteStripedPalette();       currentBlending = NOBLEND; }
        if( secondHand == 35)  { SetupBlackAndWhiteStripedPalette();       currentBlending = LINEARBLEND; }
        if( secondHand == 40)  { currentPalette = CloudColors_p;           currentBlending = LINEARBLEND; }
        if( secondHand == 45)  { currentPalette = PartyColors_p;           currentBlending = LINEARBLEND; }
        if( secondHand == 50)  { currentPalette = myRedWhiteBluePalette_p; currentBlending = NOBLEND;  }
        if( secondHand == 55)  { currentPalette = myRedWhiteBluePalette_p; currentBlending = LINEARBLEND; }
    }
}

// This function fills the palette with totally random colors.
void SetupTotallyRandomPalette()
{
    for( int i = 0; i < 16; i++) {
        currentPalette[i] = CHSV( random8(), 255, random8());
    }
}

// This function sets up a palette of black and white stripes,
// using code.  Since the palette is effectively an array of
// sixteen CRGB colors, the various fill_* functions can be used
// to set them up.
void SetupBlackAndWhiteStripedPalette()
{
    // 'black out' all 16 palette entries...
    fill_solid( currentPalette, 16, CRGB::Black);
    // and set every fourth one to white.
    currentPalette[0] = CRGB::White;
    currentPalette[4] = CRGB::White;
    currentPalette[8] = CRGB::White;
    currentPalette[12] = CRGB::White;
    
}

// This function sets up a palette of purple and green stripes.
void SetupPurpleAndGreenPalette()
{
    CRGB purple = CHSV( HUE_PURPLE, 255, 255);
    CRGB green  = CHSV( HUE_GREEN, 255, 255);
    CRGB black  = CRGB::Black;
    
    currentPalette = CRGBPalette16(
                                   green,  green,  black,  black,
                                   purple, purple, black,  black,
                                   green,  green,  black,  black,
                                   purple, purple, black,  black );
}


// This example shows how to set up a static color palette
// which is stored in PROGMEM (flash), which is almost always more
// plentiful than RAM.  A static PROGMEM palette like this
// takes up 64 bytes of flash.
const TProgmemPalette16 myRedWhiteBluePalette_p PROGMEM =
{
    CRGB::Red,
    CRGB::Gray, // 'white' is too bright compared to red and blue
    CRGB::Blue,
    CRGB::Black,
    
    CRGB::Red,
    CRGB::Gray,
    CRGB::Blue,
    CRGB::Black,
    
    CRGB::Red,
    CRGB::Red,
    CRGB::Gray,
    CRGB::Gray,
    CRGB::Blue,
    CRGB::Blue,
    CRGB::Black,
    CRGB::Black
};

Sorry, have inserted the whole Void loop section of the code as this is where the problem appears to be. Apologies for that.

void loop() {
  //Call the main menu.
  mainMenu();
// Calculate how long no data backet was received
unsigned long lastPacket = DMXSerial.noDataSince();

if (lastPacket < 5000) 
  // read recent DMX values and set pwm levels
  EEPROM.get (0, dmxvalue); 

  //START OF CODE IF NO DMX RECIEVED


    ChangePalettePeriodically(){;
    
    static uint8_t startIndex = 0;
    startIndex = startIndex + 1; /* motion speed */
    
    FillLEDsFromPaletteColors( startIndex);
    
    FastLED.show();
    FastLED.delay(1000 / UPDATES_PER_SECOND);
}

void FillLEDsFromPaletteColors( uint8_t colorIndex)
{
    uint8_t brightness = 255;
    
    for( int i = 0; i < NUM_LEDS; i++) {
        leds[i] = ColorFromPalette( currentPalette, colorIndex, brightness, currentBlending);
        colorIndex += 3;
    }
}


// There are several different palettes of colors demonstrated here.
//
// FastLED provides several 'preset' palettes: RainbowColors_p, RainbowStripeColors_p,
// OceanColors_p, CloudColors_p, LavaColors_p, ForestColors_p, and PartyColors_p.
//
// Additionally, you can manually define your own color palettes, or you can write
// code that creates color palettes on the fly.  All are shown here.

void ChangePalettePeriodically()
{
    uint8_t secondHand = (millis() / 1000) % 60;
    static uint8_t lastSecond = 99;
    
    if( lastSecond != secondHand) {
        lastSecond = secondHand;
        if( secondHand ==  0)  { currentPalette = RainbowColors_p;         currentBlending = LINEARBLEND; }
        if( secondHand == 10)  { currentPalette = RainbowStripeColors_p;   currentBlending = NOBLEND;  }
        if( secondHand == 15)  { currentPalette = RainbowStripeColors_p;   currentBlending = LINEARBLEND; }
        if( secondHand == 20)  { SetupPurpleAndGreenPalette();             currentBlending = LINEARBLEND; }
        if( secondHand == 25)  { SetupTotallyRandomPalette();              currentBlending = LINEARBLEND; }
        if( secondHand == 30)  { SetupBlackAndWhiteStripedPalette();       currentBlending = NOBLEND; }
        if( secondHand == 35)  { SetupBlackAndWhiteStripedPalette();       currentBlending = LINEARBLEND; }
        if( secondHand == 40)  { currentPalette = CloudColors_p;           currentBlending = LINEARBLEND; }
        if( secondHand == 45)  { currentPalette = PartyColors_p;           currentBlending = LINEARBLEND; }
        if( secondHand == 50)  { currentPalette = myRedWhiteBluePalette_p; currentBlending = NOBLEND;  }
        if( secondHand == 55)  { currentPalette = myRedWhiteBluePalette_p; currentBlending = LINEARBLEND; }
    }
}

// This function fills the palette with totally random colors.
void SetupTotallyRandomPalette()
{
    for( int i = 0; i < 16; i++) {
        currentPalette[i] = CHSV( random8(), 255, random8());
    }
}

// This function sets up a palette of black and white stripes,
// using code.  Since the palette is effectively an array of
// sixteen CRGB colors, the various fill_* functions can be used
// to set them up.
void SetupBlackAndWhiteStripedPalette()
{
    // 'black out' all 16 palette entries...
    fill_solid( currentPalette, 16, CRGB::Black);
    // and set every fourth one to white.
    currentPalette[0] = CRGB::White;
    currentPalette[4] = CRGB::White;
    currentPalette[8] = CRGB::White;
    currentPalette[12] = CRGB::White;
    
}

// This function sets up a palette of purple and green stripes.
void SetupPurpleAndGreenPalette()
{
    CRGB purple = CHSV( HUE_PURPLE, 255, 255);
    CRGB green  = CHSV( HUE_GREEN, 255, 255);
    CRGB black  = CRGB::Black;
    
    currentPalette = CRGBPalette16(
                                   green,  green,  black,  black,
                                   purple, purple, black,  black,
                                   green,  green,  black,  black,
                                   purple, purple, black,  black );
}


// This example shows how to set up a static color palette
// which is stored in PROGMEM (flash), which is almost always more
// plentiful than RAM.  A static PROGMEM palette like this
// takes up 64 bytes of flash.
const TProgmemPalette16 myRedWhiteBluePalette_p PROGMEM =
{
    CRGB::Red,
    CRGB::Gray, // 'white' is too bright compared to red and blue
    CRGB::Blue,
    CRGB::Black,
    
    CRGB::Red,
    CRGB::Gray,
    CRGB::Blue,
    CRGB::Black,
    
    CRGB::Red,
    CRGB::Red,
    CRGB::Gray,
    CRGB::Gray,
    CRGB::Blue,
    CRGB::Blue,
    CRGB::Black,
    CRGB::Black
};

  

  //END OF CODE IF NO DMX RECIEVED
 // analogWrite(RedPin, DMXSerial.read(dmxvalue));
  //analogWrite(GreenPin, DMXSerial.read(dmxvalue + 1));
  //analogWrite(BluePin,  DMXSerial.read(dmxvalue + 2));
  //analogWrite(MotorPin, DMXSerial.read(dmxvalue + 3));
 
} else {
  // Show pure red color, when no data was received since 5 seconds or more.
//  analogWrite(RedPin,   RedDefaultLevel);
//  analogWrite(GreenPin, GreenDefaultLevel);
//  analogWrite(BluePin,  BlueDefaultLevel);
//  analogWrite(MotorPin, MotorDefaultLevel);

//STRIP 1
red1 = DMXSerial.read(dmxvalue);
green1 = DMXSerial.read(dmxvalue + 1);
blue1 = DMXSerial.read (dmxvalue + 2);

//STRIP 2
red2 = DMXSerial.read(dmxvalue + 3);
green2 = DMXSerial.read(dmxvalue + 4);
blue2 = DMXSerial.read (dmxvalue + 5);

//STRIP 3
red3 = DMXSerial.read(dmxvalue + 6);
green3 = DMXSerial.read(dmxvalue + 7);
blue3 = DMXSerial.read (dmxvalue + 8);

//STRIP 4

red4 = DMXSerial.read(dmxvalue + 9);
green4 = DMXSerial.read(dmxvalue +10);
blue4 = DMXSerial.read (dmxvalue + 11);

//STRIP 5

red5 = DMXSerial.read(dmxvalue +12);
green5 = DMXSerial.read(dmxvalue + 13);
blue5 = DMXSerial.read (dmxvalue + 14);

//STRIP 6

red6 = DMXSerial.read(dmxvalue +15);
green6 = DMXSerial.read(dmxvalue + 16);
blue6 = DMXSerial.read (dmxvalue + 17);

analogWrite(MotorPin, DMXSerial.read(dmxvalue + 18));
} // if
if (itemactive == 1 && currentMenuItem == 1) {
  dmxchange();
  eeprom_read_block(array, (void *) 0x20, sizeof(array));     // Calls the 'array'
  if (digitalRead(enter) == 0) {
    eeprom_write_block((void *) 0x20, array, sizeof(array));      //saves the contents of 'array' persistantly
  }

  if (digitalRead(back) == 0) {
    itemactive = 0;
    currentMenuItem = 1;
    displayMenu(currentMenuItem);
  }
/*
  { 
  //if (Serial.available())
  {
   // int speed = Serial.parseInt();
    if (speed >= 0 && speed <= 255)
    {
      analogWrite(motorPin, speed);
    }
  }
} 
*/
//Potentiometer motor
{
sensorValue = analogRead(analogInPin)/4;
outputValue = map(sensorValue, 0, 1023, 0, 255);
analogWrite(transistorPin, sensorValue);
if (sensorValue >= 160)
{
//example
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
}
else
{ digitalWrite(9, HIGH);
digitalWrite(8, LOW);
}
delay(10); }
}

if (itemactive == 1 && currentMenuItem == 2) {
  // Submenu();
  // eproom

  if (digitalRead(back) == 0) {
    itemactive = 0;
    currentMenuItem = 2;
    displayMenu(currentMenuItem);
  }
}


if (itemactive == 1 && currentMenuItem == 3) {
  // personalitly function
  if (digitalRead(back) == 0) {
    itemactive = 0;
    currentMenuItem = 3;
    displayMenu(currentMenuItem);
  }
}


//If we are out of bounds on th menu then reset it.
if (currentMenuItem < 0 || currentMenuItem > 3) {
  currentMenuItem = 0;
}

//If we have changed Index, saves re-draws.
if (state != lastState) {
  if (state == 1) {
    //If Up
    currentMenuItem = currentMenuItem - 1;
    displayMenu(currentMenuItem);
  } else if (state == 2) {
    //If Down
    currentMenuItem = currentMenuItem + 1;
    displayMenu(currentMenuItem);
  } else if (state == 3) {
    //If Selected
    selectMenu(currentMenuItem);
  }
  //Save the last State to compare.
  lastState = state;
}
delay(5);
}

//Display Menu Option based on Index.
void displayMenu(int x) {
  switch (x) {
    case 1:
      clearPrintTitle();
      lcd.print ("-> DMX");
      break;
    case 2:
      clearPrintTitle();
      lcd.print ("-> Personality");
      break;
    case 3:
      clearPrintTitle();
      lcd.print ("-> Preset");
      break;
  }
}

The error message is appearing in the line   ChangePalettePeriodically(){;

And if you get rid of the {

.

Still the same error. In a separate code it was working perfectly which is what is confusing me!

You need to STOP posting snippets. The only way we can see what your problems are is for you to post ALL of your code.

Clearly, removing the incorrectly placed { has SOME affect.

I did try but is has said maximum is 9000 characters

This is up to Void Loop

#include <DMXSerial.h>
#include <LiquidCrystal.h>
#include <Adafruit_NeoPixel.h>
#include <EEPROM.h>
#include <FastLED.h>
LiquidCrystal lcd(22, 23, 24, 25, 26, 27);
// Constants for demo program

//const int RedPin =    5;  // PWM output pin for Red Light.
//const int GreenPin =  6;  // PWM output pin for Green Light.
//const int BluePin =   9;  // PWM output pin for Blue Light.
const int MotorPin = 12; //PWM output pin for motor
int up = 31;
int dmxvalue = 1;
int persmode = 1;
int down = 30;
int enter = 32;
int back = 33;
int array[12];
int state = 0;
int a = 255;
//int speed = 50;

int analogInPin = A0;
int sensorValue = 0;
int outputValue = 0;
int transistorPin = 46;
//Serial.begin(9600);


//States for the menu.
int currentMenuItem = 0;
int lastState = 0;
int itemactive = 0;
#define RedDefaultLevel   100
#define GreenDefaultLevel 200
#define BlueDefaultLevel  255
#define MotorDefaultLevel 100
//#define StartAddress 1 //Set DMX Start Address
//DMX Pins
#define PIN            6
#define PIN            7
#define PIN            8
#define PIN            9
#define PIN            10
#define PIN            11
//Pins when no DMX

#define LED_PIN     6
#define LED_PIN     7
#define LED_PIN     8
#define LED_PIN     9
#define LED_PIN     10
#define LED_PIN     11
#define NUM_LEDS    72
#define BRIGHTNESS  100
#define LED_TYPE    WS2811
#define COLOR_ORDER GRB
#define ChangePalettePeriodically
CRGB leds[NUM_LEDS];

#define UPDATES_PER_SECOND 100
#define NUMPIXELS      72

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(72, 3 /* Pin outputs for Strips */, NEO_GRB + NEO_KHZ800);
//int dmxvalue = 1;
//int red = 0;    int red_prev = 0;
//int green = 0;  int green_prev = 0;
//int blue = 0;   int blue_prev = 0;

//STRIP 1 int 

int red1 = 0;    int red1_prev = 0;
int green1 = 0;  int green1_prev = 0;
int blue1 = 0;   int blue1_prev = 0;

//STRIP 2

int red2 = 0;    int red_prev2 = 0;
int green2 = 0;  int green_prev2 = 0;
int blue2 = 0;   int blue_prev2 = 0;

//STRIP 3

int red3 = 0;    int red3_prev = 0;
int green3 = 0;  int green3_prev = 0;
int blue3 = 0;   int blue3_prev = 0;

//STRIP 4

int red4 = 0;    int red4_prev = 0;
int green4 = 0;  int green4_prev = 0;
int blue4 = 0;   int blue4_prev = 0;

//STRIP 5

int red5 = 0;    int red5_prev = 0;
int green5 = 0;  int green5_prev = 0;
int blue5 = 0;   int blue5_prev = 0;

//STRIP 6

int red6 = 0;    int red6_prev = 0;
int green6 = 0;  int green6_prev = 0;
int blue6 = 0;   int blue6_prev = 0;

void clearPrintTitle(){
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Menu");
  lcd.setCursor(0,1);
}

CRGBPalette16 currentPalette;
TBlendType    currentBlending;

extern CRGBPalette16 myRedWhiteBluePalette;
extern const TProgmemPalette16 myRedWhiteBluePalette_p PROGMEM;


void setup () {
  DMXSerial.init(DMXReceiver);

  // set some default values
  DMXSerial.write(1, 0);
  DMXSerial.write(2, 0);
  DMXSerial.write(3, 0);

  // enable pwm outputs
//  pinMode(RedPin,   OUTPUT); // sets the digital pin as output
//  pinMode(GreenPin, OUTPUT);
//  pinMode(BluePin,  OUTPUT);
 pinMode(MotorPin, OUTPUT);

  //Set the characters and column numbers.
  pinMode(up, INPUT);
  pinMode(down, INPUT);
  pinMode(enter, INPUT);
  pinMode(back, INPUT);
  lcd.begin(16, 2);
  //Print default title.
  clearPrintTitle();
/*
{ 
  pinMode(motorPin, OUTPUT);
  //Serial.begin(9600);
  //while (! Serial);
  //Serial.println("Speed 0 to 255");
} 
*/  
{
//Serial.begin(9600);
//pinMode(8, OUTPUT);
//pinMode(9, OUTPUT);
pinMode(transistorPin, OUTPUT);

}
}



void dmxcheck() {
  if (dmxvalue > 512) {
    dmxvalue = 1;
  }
  if (dmxvalue < 1) {
    dmxvalue = 512;
  }
  lcd.setCursor(0, 0);
  lcd.print("Dmx Address:");
  lcd.setCursor(0, 1);
  lcd.print(dmxvalue);
  delay(200);
}

void dmxchange() {
  lcd.setCursor(0, 0);
  lcd.print("Dmx Address:");
  dmxcheck();

  if (digitalRead(up) == 0) {
    lcd.clear();
    dmxvalue = dmxvalue + 1;
    // dmxcheck();
    EEPROM.put( 0, dmxvalue);
  }
  if (digitalRead(down) == 0) {
    lcd.clear();
    dmxvalue = dmxvalue - 1;
    //  dmxcheck();
    EEPROM.put ( 0, dmxvalue);
  }
}


void Submenu() {
  lcd.setCursor(0, 0);
  lcd.print("Mode");
  lcd.setCursor(0, 1);
  lcd.print(persmode);

  if (persmode > 3) {
    persmode = 1;
  }
  if (persmode < 1) {
    persmode = 3;
  }
  
  if (digitalRead(up) == 0) {
    lcd.clear();
    persmode = persmode + 1;
    delay(200);
  }
  if (digitalRead(down) == 0) {
    lcd.clear();
    persmode = persmode - 1;
    delay(200);
  }
}
void mainMenu() {
  //State = 0 every loop cycle.
  //Refresh the button pressed.
  int x = analogRead (0);
  //Set the Row 0, Col 0 position.
  lcd.setCursor(0, 0);

  if (itemactive == 0) {
    if (digitalRead(up) == 0) {
      //Up
      state = 1;
    } else if (digitalRead(down) == 0) {
      //Down
      state = 2;
    } else if (digitalRead(enter) == 0) {
      //Select
      state = 3;
    }
  }
}
//Show the selection on Screen.
void selectMenu(int x) {
  lcd.clear();
  lcd.setCursor(0, 0);

  switch (x) {
    case 1:
      //clearPrintTitle();
      itemactive = 1;
      break;

    case 2:
      itemactive = 1;
      break;

    case 3:
      //clearPrintTitle();
      itemactive = 1;          //Call the function that belongs to Option 3
      break;
  }

delay( 3000 ); // power-up safety delay
    FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
    FastLED.setBrightness(  BRIGHTNESS );
    
    currentPalette = RainbowColors_p;
    currentBlending = LINEARBLEND;

}

Below is after this till end

This is the bottom section with my void loop where the problem appears to be

void loop() {
  //Call the main menu.
  mainMenu();
// Calculate how long no data backet was received
unsigned long lastPacket = DMXSerial.noDataSince();

if (lastPacket < 5000) {
  // read recent DMX values and set pwm levels
  EEPROM.get (0, dmxvalue); 

  //START OF CODE IF NO DMX RECIEVED


    ChangePalettePeriodically(){;
    
    static uint8_t startIndex = 0;
    startIndex = startIndex + 1; // motion speed 
    
    FillLEDsFromPaletteColors( startIndex);
    
    FastLED.show();
    FastLED.delay(1000 / UPDATES_PER_SECOND);
}

void FillLEDsFromPaletteColors( uint8_t colorIndex)
{
    uint8_t brightness = 255;
    
    for( int i = 0; i < NUM_LEDS; i++) {
        leds[i] = ColorFromPalette( currentPalette, colorIndex, brightness, currentBlending);
        colorIndex += 3;
    }
}


// There are several different palettes of colors demonstrated here.
//
// FastLED provides several 'preset' palettes: RainbowColors_p, RainbowStripeColors_p,
// OceanColors_p, CloudColors_p, LavaColors_p, ForestColors_p, and PartyColors_p.
//
// Additionally, you can manually define your own color palettes, or you can write
// code that creates color palettes on the fly.  All are shown here.

void ChangePalettePeriodically()
{
    uint8_t secondHand = (millis() / 1000) % 60;
    static uint8_t lastSecond = 99;
    
    if( lastSecond != secondHand) {
        lastSecond = secondHand;
        if( secondHand ==  0)  { currentPalette = RainbowColors_p;         currentBlending = LINEARBLEND; }
        if( secondHand == 10)  { currentPalette = RainbowStripeColors_p;   currentBlending = NOBLEND;  }
        if( secondHand == 15)  { currentPalette = RainbowStripeColors_p;   currentBlending = LINEARBLEND; }
        if( secondHand == 20)  { SetupPurpleAndGreenPalette();             currentBlending = LINEARBLEND; }
        if( secondHand == 25)  { SetupTotallyRandomPalette();              currentBlending = LINEARBLEND; }
        if( secondHand == 30)  { SetupBlackAndWhiteStripedPalette();       currentBlending = NOBLEND; }
        if( secondHand == 35)  { SetupBlackAndWhiteStripedPalette();       currentBlending = LINEARBLEND; }
        if( secondHand == 40)  { currentPalette = CloudColors_p;           currentBlending = LINEARBLEND; }
        if( secondHand == 45)  { currentPalette = PartyColors_p;           currentBlending = LINEARBLEND; }
        if( secondHand == 50)  { currentPalette = myRedWhiteBluePalette_p; currentBlending = NOBLEND;  }
        if( secondHand == 55)  { currentPalette = myRedWhiteBluePalette_p; currentBlending = LINEARBLEND; }
    }
}

// This function fills the palette with totally random colors.
void SetupTotallyRandomPalette()
{
    for( int i = 0; i < 16; i++) {
        currentPalette[i] = CHSV( random8(), 255, random8());
    }
}

// This function sets up a palette of black and white stripes,
// using code.  Since the palette is effectively an array of
// sixteen CRGB colors, the various fill_* functions can be used
// to set them up.
void SetupBlackAndWhiteStripedPalette()
{
    // 'black out' all 16 palette entries...
    fill_solid( currentPalette, 16, CRGB::Black);
    // and set every fourth one to white.
    currentPalette[0] = CRGB::White;
    currentPalette[4] = CRGB::White;
    currentPalette[8] = CRGB::White;
    currentPalette[12] = CRGB::White;
    
}

// This function sets up a palette of purple and green stripes.
void SetupPurpleAndGreenPalette()
{
    CRGB purple = CHSV( HUE_PURPLE, 255, 255);
    CRGB green  = CHSV( HUE_GREEN, 255, 255);
    CRGB black  = CRGB::Black;
    
    currentPalette = CRGBPalette16(
                                   green,  green,  black,  black,
                                   purple, purple, black,  black,
                                   green,  green,  black,  black,
                                   purple, purple, black,  black );
}


// This example shows how to set up a static color palette
// which is stored in PROGMEM (flash), which is almost always more
// plentiful than RAM.  A static PROGMEM palette like this
// takes up 64 bytes of flash.
const TProgmemPalette16 myRedWhiteBluePalette_p PROGMEM =
{
    CRGB::Red,
    CRGB::Gray, // 'white' is too bright compared to red and blue
    CRGB::Blue,
    CRGB::Black,
    
    CRGB::Red,
    CRGB::Gray,
    CRGB::Blue,
    CRGB::Black,
    
    CRGB::Red,
    CRGB::Red,
    CRGB::Gray,
    CRGB::Gray,
    CRGB::Blue,
    CRGB::Blue,
    CRGB::Black,
    CRGB::Black
};

*/
  

  //END OF CODE IF NO DMX RECIEVED
 // analogWrite(RedPin, DMXSerial.read(dmxvalue));
  //analogWrite(GreenPin, DMXSerial.read(dmxvalue + 1));
  //analogWrite(BluePin,  DMXSerial.read(dmxvalue + 2));
  //analogWrite(MotorPin, DMXSerial.read(dmxvalue + 3));
 
} else {
  // Show pure red color, when no data was received since 5 seconds or more.
//  analogWrite(RedPin,   RedDefaultLevel);
//  analogWrite(GreenPin, GreenDefaultLevel);
//  analogWrite(BluePin,  BlueDefaultLevel);
//  analogWrite(MotorPin, MotorDefaultLevel);

//STRIP 1
red1 = DMXSerial.read(dmxvalue);
green1 = DMXSerial.read(dmxvalue + 1);
blue1 = DMXSerial.read (dmxvalue + 2);

//STRIP 2
red2 = DMXSerial.read(dmxvalue + 3);
green2 = DMXSerial.read(dmxvalue + 4);
blue2 = DMXSerial.read (dmxvalue + 5);

//STRIP 3
red3 = DMXSerial.read(dmxvalue + 6);
green3 = DMXSerial.read(dmxvalue + 7);
blue3 = DMXSerial.read (dmxvalue + 8);

//STRIP 4

red4 = DMXSerial.read(dmxvalue + 9);
green4 = DMXSerial.read(dmxvalue +10);
blue4 = DMXSerial.read (dmxvalue + 11);

//STRIP 5

red5 = DMXSerial.read(dmxvalue +12);
green5 = DMXSerial.read(dmxvalue + 13);
blue5 = DMXSerial.read (dmxvalue + 14);

//STRIP 6

red6 = DMXSerial.read(dmxvalue +15);
green6 = DMXSerial.read(dmxvalue + 16);
blue6 = DMXSerial.read (dmxvalue + 17);

analogWrite(MotorPin, DMXSerial.read(dmxvalue + 18));
} // if
if (itemactive == 1 && currentMenuItem == 1) {
  dmxchange();
  eeprom_read_block(array, (void *) 0x20, sizeof(array));     // Calls the 'array'
  if (digitalRead(enter) == 0) {
    eeprom_write_block((void *) 0x20, array, sizeof(array));      //saves the contents of 'array' persistantly
  }

  if (digitalRead(back) == 0) {
    itemactive = 0;
    currentMenuItem = 1;
    displayMenu(currentMenuItem);
  }
/*
  { 
  //if (Serial.available())
  {
   // int speed = Serial.parseInt();
    if (speed >= 0 && speed <= 255)
    {
      analogWrite(motorPin, speed);
    }
  }
} 
*/
//Potentiometer motor
{
sensorValue = analogRead(analogInPin)/4;
outputValue = map(sensorValue, 0, 1023, 0, 255);
analogWrite(transistorPin, sensorValue);
if (sensorValue >= 160)
{
//example
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
}
else
{ digitalWrite(9, HIGH);
digitalWrite(8, LOW);
}
delay(10); }
}

if (itemactive == 1 && currentMenuItem == 2) {
  // Submenu();
  // eproom

  if (digitalRead(back) == 0) {
    itemactive = 0;
    currentMenuItem = 2;
    displayMenu(currentMenuItem);
  }
}


if (itemactive == 1 && currentMenuItem == 3) {
  // personalitly function
  if (digitalRead(back) == 0) {
    itemactive = 0;
    currentMenuItem = 3;
    displayMenu(currentMenuItem);
  }
}


//If we are out of bounds on th menu then reset it.
if (currentMenuItem < 0 || currentMenuItem > 3) {
  currentMenuItem = 0;
}

//If we have changed Index, saves re-draws.
if (state != lastState) {
  if (state == 1) {
    //If Up
    currentMenuItem = currentMenuItem - 1;
    displayMenu(currentMenuItem);
  } else if (state == 2) {
    //If Down
    currentMenuItem = currentMenuItem + 1;
    displayMenu(currentMenuItem);
  } else if (state == 3) {
    //If Selected
    selectMenu(currentMenuItem);
  }
  //Save the last State to compare.
  lastState = state;
}
delay(5);
}

//Display Menu Option based on Index.
void displayMenu(int x) {
  switch (x) {
    case 1:
      clearPrintTitle();
      lcd.print ("-> DMX");
      break;
    case 2:
      clearPrintTitle();
      lcd.print ("-> Personality");
      break;
    case 3:
      clearPrintTitle();
      lcd.print ("-> Preset");
      break;
  }
}

//Show the selection on Screen.


// End.

Thanks in advance

What do you think this this is going to do latter on in the sketch?

#define ChangePalettePeriodically
CRGB leds[NUM_LEDS];

This sketch looks like a dogs breakfast.

.

The aim for if no DXM signal is received then for the LED pixels to revert to a default pattern that was designed in a seperate code.

And I know its a bit of a mess, once I get it working then I will attempt to clean up the coding

once I get it working then I will attempt to clean up the coding

Tidy it up now. It will make fixing the problem easier.

Have you posted your whole program yet ?

Whole programme is posted now. I have tried to clean it up and have removed a lot of useless text but still same error message and now completely stuck

You still have:
ChangePalettePeriodically(){;

once I get it working then I will attempt to clean up the coding

Famous last words.

#define ChangePalettePeriodically

When the compiler sees 'ChangePalettePeriodically' in the sketch it replaces it with nothing.

Hence:
#define ChangePalettePeriodically
. . .
ChangePalettePeriodically(){;
. . .
void ChangePalettePeriodically()

.

Still same problem, have defined it, then added a void and still got the same message. What am I doing wrong? Am super confused here!

#define PIN            6
#define PIN            7
#define PIN            8
#define PIN            9
#define PIN            10
#define PIN            11
//Pins when no DMX

#define LED_PIN     6
#define LED_PIN     7
#define LED_PIN     8
#define LED_PIN     9
#define LED_PIN     10
#define LED_PIN     11

What do you want PIN and LED_PIN to be?

LED_PIN is when there is no DMX signal present if that makes any sense at all

#define PIN            6
#define PIN            7
#define PIN            8
#define PIN            9
#define PIN            10
#define PIN            11

Please explain what you think this block of code does.

How have you 9000 lines of code but got this problem, are you testing your code as you go? Save you project and then strip it back delete most of it other than the problem area. Then post this section. Good organisation of your code should make this easy. If your having problems doing this then you should just start again. Use you previous code as an sort of template but reset it out in a modular way -class, sensible functions, separate files etc. It sound like a very basic error, and that doesn't fit with having 9000 lines of arduino code. Often if you cant find it a re write will solve your problem. Sounds like your rushing ahead with out getting the basics sorted.

Buddy, your defines must have different names... if you do :

#define PIN 9
#define PIN 10

Its totally wrong. You are defining TWO values to that PIN, when it can actually have ONE. You must decide which value you want to define for that pin. If you have another pin you should define it with another name as well.

#define PIN_SOMETHING 9
#define PIN_SOMETHING_ELSE 10

this should be better