Setting Alarm Problem

I want to set an alarm with a specified serially read time I've tried every thing i can ,I even created a new function inside the library but nothing get me there
I need Help

void loop() {
  
 digitalClockDisplay();
 Alarm.delay(1000);
    if (Serial.available()>0)
 {   
   
  char setString[TIME_SET_StrLen];
  int index = 0;
 char c = Serial.read();
 if( c != '[')
     return;  // first character must be opening square brackets
  do
  {
     c = Serial.read();
     if( isdigit(c))  // non numeric characters are discarded
       setString[index++] = c -'0'; // convert from ascii    
  }
  while (c != ']'); // wait for trailing square brackets

 int count = index;
  int element = 0;
  for( index = 0; index < count; index += 2)  // step through each pair of digits
  {
      int val = setString[index] * 10 + setString[index+1] ; // get the numeric value of the next pair of numbers
switch( element++){
        case  0 :  Hour = val; break;
        case  1 :  Minute = val; break;
        case  2 :  Second = val; break;
}  
} }   
  
 Serial.print(Hour );
  Serial.print(Minute);
   Serial.print(Second);
   Serial.println("go to school");
   
     Alarm.alarmRepeat(20,20,0, MorningAlarm); 
      Alarm.alarmRepea(Hour,Minute,Second,EveningAlarm); // my new function it works fine but not with serial date 
   
  }

the function on the library

AlarmID_t TimeAlarmsClass::alarmRepea(int H, int M, int S, OnTick_t onTickHandler){ 
     return create( AlarmHMS(H,M,S), onTickHandler, IS_ALARM, IS_REPEAT );
}

but nothing get me there

What does the code you posted actually do? How does that differ from what you actually want it to do?

Give us a clue where the problem is/

i want to enter the values of hours,minutes,seconds from a serial interface (vb) and set the alarm on the value received , but the function
Alarm.alarmRepeat(Hour,Minute,Second,EveningAlarm);

doesnt work unless it had a constant time value specified from within the arduino and again i need to send the value from a vb

so I was wondering if there is a way to set the alarm in another way

note: I use
#include <Time.h>
#include <TimeAlarms.h>

My phone browser doesn't show all your code but it looks like you're reading characters that may not be there.

Serial data transmission is sssslllloooowwww, The Arduino is fast, by comparison. You should declare the array to hold the serial data as a global variable, and populate it in a while loop, until there is no more serial data or until the end-of-packet marker is received.

I thought in a different way without referencing to the alarm library and used a simple if-statement

   if (hour()== Hour &&  minute() == Minute)
   {
 
     EveningAlarm1();
   }

This is what i want , thanks for help and suggestions :smiley: