no delay time issues

helow guys

I'm working on a project for my nephew. It is a springkling system with multiple sprinkeling daytimes. I used no delay so I can change from program anny time. At first I tried it with small delays like 2 or 3 seconds and everithing worked fine but when I uploaded it with large delays it took only a brake of 10 or 15 second before it springkeled the next time. So It took othet delay times then I programmed. What do I do wrong?

I explane the program short.

There are 4 buttons to change the delay time between 2 pump sessions and one button to pump manual. if you puch one of the 4 you pick other delay times to sprinkel. 2,3,4 or5 time each 24 hour. i gues this number is to big bcs it acts weird at high values. The 5th button only makes the pump pumping when pushed.

int manual;
bool start = HIGH ;
int m;  
int ledState = LOW;                      // making LED low when starting
unsigned long previousMillis = 0;        
const unsigned long shortInterval  = 20000;     // time of pumping
unsigned long longInterval;              // pauze time
byte state;                              
long interval;                           
bool shortBeat;


const int tijd1     = 43200000;                    //12u pauze = 43200000ms
const int tijd2     = 28800000;                   //8u pauze  = 28800000ms
const int tijd3     = 21600000;                    //6u pauze  = 21600000ms
const int tijd4     = 16920000;                    //5u pauze  = 16920000ms

void setup() {


  pinMode(3, INPUT_PULLUP);   // button1
  pinMode(4, INPUT_PULLUP);   // button2
  pinMode(5, INPUT_PULLUP);   // button3
  pinMode(6, INPUT_PULLUP);   // button4

  pinMode(7, INPUT);          // INPUT pushbutton manual

  pinMode(8, OUTPUT);    // LED1
  pinMode(9, OUTPUT);    // LED2
  pinMode(10, OUTPUT);   // LED3
  pinMode(11, OUTPUT);   // LED4
  pinMode(12, OUTPUT);   // LED-manual
  pinMode(13, OUTPUT);   // LED-MOTOR
}



void loop() {

  if ((digitalRead(3) == HIGH)||(start==HIGH)) {    //push button 1 for sucle 0
    m = 0;
    longInterval = tijd1;
    start = LOW;
  }

  if (digitalRead(4) == HIGH) {    //push button 2 for sucle 1
    m = 1;
    longInterval = tijd2;
    start = LOW;
  }

  if (digitalRead(5) == HIGH) {    //push button 3 for sucle 2
    m  =  2;
    longInterval = tijd3;
    start = LOW;
  }

  if (digitalRead(6) == HIGH) {    //push button 4 for sucle 3
    m  = 3;
    longInterval = tijd4;
    start = LOW;
  }

  if (digitalRead(7) == HIGH) {    //push button 5 for sucle 4
    m  = 4;
    start = LOW;
  }
  switch (m) {

    case 0: {                   //if case is 0
        digitalWrite(8, HIGH);
        digitalWrite(9, LOW);
        digitalWrite(10, LOW);
        digitalWrite(11, LOW);
        digitalWrite(12, LOW);
        manual= 0;
        break;
      }

    case 1: {                 //if case is 1
        digitalWrite(8, LOW);
        digitalWrite(9, HIGH);
        digitalWrite(10, LOW);
        digitalWrite(11, LOW);
        digitalWrite(12, LOW);
        manual= 0;
        break;
      }

    case 2: {                   //if case is 2
        digitalWrite(8, LOW);
        digitalWrite(9, LOW);
        digitalWrite(10, HIGH);
        digitalWrite(11, LOW);
        digitalWrite(12, LOW);
        manual= 0;
        break;
      }

    case 3: {                   //if case is 3
        digitalWrite(8, LOW);
        digitalWrite(9, LOW);
        digitalWrite(10, LOW);
        digitalWrite(11, HIGH);
        digitalWrite(12, LOW);
        manual= 0;
        break;
      }

    case 4: {                   //if case is 4
        digitalWrite(8, LOW);
        digitalWrite(9, LOW);
        digitalWrite(10, LOW);
        digitalWrite(11, LOW);
        digitalWrite(12, HIGH);
        manual= 1;

        if ((automatisch == 1) && (digitalRead(7) == HIGH)) { // makes shure it only pumps when the button is pressed
          digitalWrite(13, HIGH);
          digitalWrite(2, HIGH);
        }
        else {
          digitalWrite(13, LOW);
          digitalWrite(2, LOW);
        }
        break;
      }




  }                                      // end switch

  unsigned long currentMillis = millis(); 

  if ((currentMillis - previousMillis >= interval) && (manual== 0)) 
  {
    previousMillis = currentMillis;      

    switch (state++ & 1)
    {
      case 0:                            
        ledState = HIGH;                 //pumpen starten
        interval = shortInterval;        //time between 2 pumpsessions
        break;

      case 1:                            
        ledState = LOW;                  //stop pumping
        interval = longInterval;         //pumptime
        break;

    }                                  // end switch

    digitalWrite(2, ledState);    //case of the pump
    digitalWrite(13, ledState);
  }                                      


}                                        //end program

On a board that uses 16 bit ints (such as the AVR boards like Uno, Mega, Leonardo), the maximum number the int type can hold is 32767: https://www.arduino.cc/reference/en/language/variables/data-types/int/

so what should i do?

Use an appropriate type for your variables. You can find documentation for the various types here:
http://www.arduino.cc/reference/en

Karma for using code tags in your first post ;)

But this is not a troubleshooting/installation question ;) Should go in the programming section. You can report your post (click report to moderator under your post) and ask for it to be moved.