Program Not Writing to Servo in For loop of Else statement

#include<Servo.h>

Servo servo1;


int incoming[1];
int last_pos = 0;
int current_pos = 90;
boolean values_recieved = false;

void setup(){
  servo1.attach(9);
  servo1.write(0);
  servo1.write(current_pos);
  Serial.begin(9600);
  Serial.println("Ready");
}

void loop(){
  
  updateServo();
  
  recieveValues();
  
  if(values_recieved){
  
    Serial.print("Degrees: ");
    Serial.println(incoming[0]);
    Serial.print("Direction: ");
    Serial.println(incoming[1]);
     
  }
  
  
  
  
  
  
  delay(100);
  
}

void recieveValues(){
  
  if(Serial.available() >= 2){
    
    values_recieved = true;
    
    for(int i=0; i<2; i++){
    
      incoming[i]=Serial.read();
    }
    
  }else{
    values_recieved = false;
    incoming[1] = 0;
    incoming[0] = 0;
  }
}

void updateServo(){
  
  last_pos = current_pos;
  
  if(incoming[1]==0){
    
    current_pos = incoming[0] + current_pos;
    for(int i=last_pos; i<current_pos; i++){
      delay(100);
      servo1.write(i);
      if(i==180){
        break;
      }
    }
    
  }else{
    
    current_pos = incoming[0] + current_pos;
    for(int j=last_pos; j<current_pos; j++){
      Serial.println("IN FOR LOOP");
      delay(100);
      servo1.write(j);
      if(j==180){
        break;
      }
    }
  }
  
  
}

In the else statement in the updateServo function, it is not writing to the servo. I find this very strange because when I was troubleshooting it, I changed it so that it is exactly the same as the if statement above it, which works, but it still does not write to the servo in the else statement.

Any ideas?

Your one element array incoming has no incoming[1] member. One declares an array with the number of elements.
Int incoming[1] is an array of 1 element, that element is incoming[0].
Edit, Int incoming[2] would have an incoming[1] element.

And, of course, one element arrays are useless, so stop creating one element arrays.

Seems to have solved the problem. Thanks for the help!