Multiple Serial.Read Conditions & Parse int

Hello, excuse my English and my horrible code down below, it’s my first time coding with an arduino uno.

For a project I need to set the values of an RGB led through the Serial Monitor…
The Serial only reads the input when it’s formatted like this: “#SET_RED:” or “#SET_BLUE:%”.
To top it off, it only needs to set the lights when the remote control is turned on; “#REMOTE_CONTROL%”.
So:
#REMOTE_CONTROL%
#SET_RED:225%
#SET_GREEN:0%
#SET_BLUE:255%

The problem with my code is that it does not register any valid integers. It always returns a value of zero. Thus, I cannot set my RGB led. Could someone please help me fix the parseInt problem?
Please help?

#define RED 3 
#define GREEN 5 
#define BLUE 6

bool newData = false;
char startMarker = '#';
char endMarker = '%';
char Serial_input;
const byte numChars = 32;
char received_Chars[numChars];
char remote[14] = "REMOTE_CONTROL";
char setRed[7] = "SET_RED";
char setGreen[10] = "SET_GREEN:";
char setBlue[9] = "SET_BLUE:";
long redSerialValue = 0;
long greenSerialValue = 0;
long blueSerialValue = 0;
bool redInt = false;
bool greenInt = false;
bool blueInt = false;

void setup()
{
  pinMode(RED, OUTPUT);
  pinMode(GREEN, OUTPUT);
  pinMode(BLUE, OUTPUT);
  pinMode(SINGLE_LED, OUTPUT);
  Serial.begin(9600);
  Serial.println("<Arduino is ready>");
}
void loop()
  {
  
  
    if (receive_Serial_Input())
    {
      show_New_Data();
    }
  }

bool receive_Serial_Input()
{
  static boolean recvInProgress = false;
  static byte index = 0;

  while (Serial.available() > 0 && newData == false)
  {
    Serial_input = Serial.read();

    if (Serial_input == startMarker)
    { // set to true if input == #
      recvInProgress = true;
      index = 0;
    }
    else if (Serial_input == endMarker && recvInProgress == true)
    { // reset the input count
      received_Chars[index] = '\0'; // terminate the string

      recvInProgress = false;
      index = 0;
      newData = true;
    }
    else // safe everything to an array while there's no endMarker
    {
      if (recvInProgress == true)  // check for the start marker
      {
        received_Chars[index] = Serial_input; // put serial chars into an array
        index++;
      }
    }
  }
  return newData;
} 

void show_New_Data()
{
  if (newData == true)
  {
    Serial.print("This just in: ");
    Serial.println(received_Chars);
    // Serial.println(redInt, DEC );
    newData = false;
  }
  if (strcmp(received_Chars, "REMOTE_CONTROL") == 0)
  {
    digitalWrite(SINGLE_LED, HIGH);
    Serial.println("REMOTE CONTROL ACTIVATED");

    remote_Control = true;
  }
  if (compareCharArray(received_Chars, setRed, 7 ))
  {
    redInt = true;
    Serial.println("red");
  }
  else if (compareCharArray(received_Chars, setGreen, 10))
  {
    greenInt = true;
    Serial.println("Groen");
  }
  else if (compareCharArray(received_Chars, setBlue, 9))
  {
    blueInt = true;
    Serial.println(blueSerialValue);
    Serial.println("blue");

  }
  if (remote_Control == true) // only in remote control mode
  {

    if (redInt) {

      redSerialValue = Serial.parseInt();
      Serial.println(redSerialValue);
      Serial.println("Red is true");
      redInt = false;
    }
    else if (greenInt)
    {
      greenSerialValue = Serial.parseInt();
      Serial.println(redSerialValue);
      Serial.println("Green is true");
      greenInt = false;
    }
    Serial.flush();
  }

}

Can you post complete code? This does not compile.

Further, the trick with Robins code is that you only use his receive function once and don't mix with other access of Serial; the below will again read from Serial and will not get anything and hence parseInt will return 0.

redSerialValue = Serial.parseInt();

Look at Robin's example where he parses using strtok().

Lastly, you need to keep track in which mode you are; did not check if you do. that will allow 'automatic' and 'manual'.

Borborygm:
So:
#REMOTE_CONTROL%
#SET_RED:225%
#SET_GREEN:0%
#SET_BLUE:255%

You could make life much easier for your Arduino if you simplify those messages like this

#C:0%
#R:255%
#G:0%
#B:255%

Note that I am using 'C' to mean remoteControl so that it is not confused with Red. And I have added a ":0" to the C command just so it is the same style as all the others and can be interpreted by the same parse code

...R