What's up with my code?
Your IF statement, you're using: (val = 0), and I believe you meant (val == 0).

Also, you're using else(val &gt; 0) and else doesn't need any argument. So the fixed code should look like:

int sidepin = 2;
int LED = 5;
int val;
void setup() {
  pinMode(sidepin, INPUT);
  pinMode(LED, OUTPUT);
}

void loop() {
  val = digitalRead(sidepin);
  if(val == LOW)
  {
    pinMode(LED, HIGH);
  }
  else
  {
    pinMode(LED, LOW);
  }
}