Pre Defining LEDs numbers prior to loop

I thought I had this last night but it’s not working now. To state what will become very obvious, I’m new to this.

I have a string of of LEDs that I want to change color when the digital pin goes LOW. There are 15 different groups of lights in the 55 LED strand. My goal was to #define the i values and then use those named values in the code but its not working. The strategy of Pre defining worked great for color but not for the LED locations. Please let me know what I’m missing. I will post all of the code but its a work in progress with many things that aren’t working yet. the parts that are baffling me are first. I would like to have theses pre defined because I will need to adjust them at a later date and it would be much easier to do it in one spot.

Parts that are confusing me-

#define RightSide         (int i=0; i<4; i++) // Error message for this "expected primary-expression before 'int'"
#define RightSide         (i=0; i<4; i++) // Error message for this - "expected ')' before ';' token"

//What I want to do is drop these after the 'for' command to define the lights will change

for (RightSide){
fill_solid (leds,RightSide[i], RED1)

Here is the full code. Again, I’m new, and a bunch of this is experimental weirdness.

#include <FastLED.h>
#define NUM_LEDS 55
#define DATA_PIN 10
CRGB leds[NUM_LEDS];

// constants won't change. They're used here to set pin numbers:
const int RightF = 2;     // pin number of the burner relay 
const int RightR = 3;     // pin number of the burner relay
int buttonState1 = 0;         // variable for reading the pushbutton status
int buttonState2 = 0;         // I copied this from the example
int lightsRF[ ] = {0,1,2,3,4};         // first try at defining an set of LEDs  
int i;                      
#define WW CRGB(225,200,25) //These work great for defining color! Can I do this for locations?
#define RED1 CRGB(225,0,0)
#define ORANGE_3 CRGB(255,165,0) = 0;
#define RightSide         (i=0; i<4; i++) //Second try at defining an set of LEDs  (i though this worked so I kept going) 
#define RightFront        (i=4; i<7; i++)
#define RightCenter       (i=8; i<11; i++)
#define RightRear         (i=12; i<15; i++);
#define CenterRightGap    (i=16; i<21; i++);
#define CenterFront       (i=22; i<25; i++);
#define CenterCenter      (i=26; i<29; i++);
#define CenterRear        (i=30; i<33; i++);
#define OvenCenterGap     (i=34; i=34; i++);
#define Oven              (i=35; i=38; i++);
#define OvenLeftGap       (i=39; i=39; i++);
#define LeftFront         (i=40; i=43; i++);
#define LeftCenter        (i=44; i=47; i++);
#define LeftRear          (i=48; i=51; i++);
#define LeftSide          (i=52; i=54; i++);

void setup() {
   FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS); 
   
  // initialize the pushbutton pin as an input:
  pinMode(RightF, INPUT_PULLUP);  // setting burner locations to pullup 
  pinMode(RightR, INPUT_PULLUP);  // 
  
  
}

void loop() {
  bool ledsOn;
  // read the state of the pushbutton value:
  buttonState1 = digitalRead(RightF);
  buttonState2 = digitalRead(RightR);

  ledsOn = false;
  
  // check if the pushbutton is pressed. If it is, the buttonState is LOW:
  if (buttonState1 == LOW) {
    // turn LED on:
   // leds[1] =  RED1; //these work but it seems like a bad way to do this. array?
   // leds[2] =  RED1; //these work
    //leds[3] =  RED1; //these work
   // leds[4] =  RED1; //these work
    for (RightSide){
    fill_solid (leds,RightSide[i], RED1);  //the LED defining does not work but the color defining does
    FastLED.show();
    ledsOn = true;
  } 
  
  if (buttonState1 == HIGH) {
    // turn LED on:
    leds[1] =  CRGB(225,0,0); //these work but it seems like a bad way to do this. array?
    leds[2] =  CRGB(225,0,0); //these work
    leds[3] =  CRGB(225,0,0); //these work
    leds[4] =  CRGB(225,0,0); //these work
    //fill_solid (leds,lightsRF[i], CRGB(225,0,0));  
    FastLED.show();
    ledsOn = true;
  }
  
  if (!ledsOn){
    // turn all back to warm white after burner is off :
    fill_solid (leds,NUM_LEDS, CRGB(225,200,25));
     FastLED.show();
  }
}

for RightSide{?

Well I was wrong, that did not work, now all the LED's turn red

Post your code

I now have two buttons ‘working’ without having to define each LED separately. Thank you for the help with that.
I’m changing this to a new post because now I have different issue but I’d like to say that the defining the LEDs worked for me when trying to group LEDs in a strand.

Thank you to TheMemberFormerlyKnownAsAWOL

Here is an example of working redefined LED groups (the function leaves a lot to be desired)

#include <FastLED.h>
#define NUM_LEDS 55
#define DATA_PIN 10
CRGB leds[NUM_LEDS];

// constants won't change. They're used here to set pin numbers:
const int RightF = 2;     // pin number of the burner relay 
const int RightR = 3;     // pin number of the burner relay 
#define WW CRGB(225,200,25)
#define RED1 CRGB(225,0,0)
#define RightSide         (i=0; i<5; i++)
#define RightFront        (i=5; i<9; i++)


int buttonState1 = 0;         // variable for reading the pushbutton status
int buttonState2 = 0;         
int i;                     

void setup() {
   FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS); 
   
  // initialize the pushbutton pin as an input:
  pinMode(RightF, INPUT_PULLUP);  // setting burner locations to pullup 
  pinMode(RightR, INPUT_PULLUP);  // 
  
  
}

void loop() {
  bool ledsOn;
  // read the state of the pushbutton value:
  buttonState1 = digitalRead(RightF);
  buttonState2 = digitalRead(RightR);

  ledsOn = false;
  
  // Right Side 
    // Low Turns LEDS 0-3 RED1
      if (buttonState1 == LOW) {
        for RightSide{
          fill_solid (leds, i, RED1);  //this does not work. Figure it out after flicker problem 
            }
       FastLED.show();
       ledsOn = true;
        } 

     // High turns LEDS 0-3 WW
       if (buttonState1 == HIGH) {
        for RightSide{
          fill_solid (leds, i, WW);  
            }
    FastLED.show();
    ledsOn = true;

    ledsOn = false;
  
  // Right Front
    // Low Turns LEDS 0-3 RED1
      if (buttonState2 == LOW) {
        for RightFront{
          fill_solid (leds, i, RED1);  //this does not work. Figure it out after flicker problem 
            }
       FastLED.show();
       ledsOn = true;
        } 

     // High turns LEDS 0-3 WW
       if (buttonState2 == HIGH) {
        for RightFront{
          fill_solid (leds, i, WW);  
            }
    FastLED.show();
    ledsOn = true;

      if (!ledsOn){
    // turn all back to warm white after burner is off :
    fill_solid (leds,NUM_LEDS, CRGB(225,200,25));
     FastLED.show();
  }
}
}
}