why doesnt this work?

Why is the light always off? (the circuit is correct, i did a tutorial with it from "getting started with arduino" and that worked.

#define LED 13
#define BUTTON 7

int val = 0;
int old_val = 0;

int mode = 0;

void setup() {
  pinMode(LED, OUTPUT);
  pinMode(LED, INPUT);
}

void loop() {
  val = digitalRead(BUTTON);
  
  if ((val == HIGH) && (old_val == LOW)) {
    mode++;
    if (mode > 2) {
      mode = 0;
    }
  }
  
  old_val = val;
  
  if (mode == 0) {
    constant();
  }
  else if(mode == 1) {
    beep();
  }
  else if(mode == 2) {
    off();
  }
  
}



void constant() {
   digitalWrite(LED, HIGH);
}

void beep() {
   digitalWrite(LED, HIGH);
   delay(1000);
   digitalWrite(LED, LOW);  
   delay(1000);
}

void off() {
   digitalWrite(LED, LOW); 
}

Here's your problem:

  pinMode(LED, OUTPUT);
  pinMode(LED, INPUT);

Presumably should have been

  pinMode(LED, OUTPUT);
  pinMode(BUTTON, INPUT);