Possible Syntax Error?

I am working on a small project for my wife using Aaron ALAI's simple design for an emf detector. I am trying to take the original design and instead of using the input from the analog signal to light one led I have set up a simple bar of leds using 160 ohm resistors and pins 6-12 on the board. With the original code and one led the program ran just fine detecting electronic fields and lighting the led. However when I tried to implement my design the leds are failing to light. I will post the original code and my code in hopes its a simple error and easy to fix. Thanks for any and all help.

Original Code

int inPin = 5;             // analog 5
int val = 0;                 // where to store info from analog 5
int pin11 = 11;         // output of red led

void setup() {
 
  Serial.begin(9600);
 
}

void loop() {
 
  val = analogRead(inPin);                    // reads in the values from analog 5 and
                                                                   //assigns them to val
  if(val >= 1){
   
    val = constrain(val, 1, 100);               // mess with these values                                      
    val = map(val, 1, 100, 1, 255);        // to change the response distance of the device
    analogWrite(pin11, val);                    // *note also messing with the resistor should change 
                                                                   // the sensitivity
   }else{                                                     // analogWrite(pin11, val); just tuns on the led with
                                                                  // the intensity of the variable val
    analogWrite(pin11, 0);                     // the else statement is just telling the microcontroller
                                                                 // to turn off the light if there is no EMF detected
  }
 
 Serial.println(val);                                // use output to aid in calibrating

Updated Code That Is Failing Me!

int inPin = 5;             
int val = 0;                 
int ledPin = 12;
int ledPin2 = 11;
int ledPin3 = 10;
int ledPin4 = 9;
int ledPin5 = 8;
int ledPin6 = 7;
int ledPin7 = 6;

void setup() 
{
 
  pinMode(ledPin, OUTPUT);
  pinMode(ledPin2, OUTPUT);
  pinMode(ledPin3, OUTPUT);
  pinMode(ledPin4, OUTPUT);
  pinMode(ledPin5, OUTPUT);
  pinMode(ledPin6, OUTPUT);
  pinMode(ledPin7, OUTPUT);
  
  Serial.begin(9600);
 
}

void loop() 
{
 
  val = analogRead(inPin); 

  if(val >= 1)
   {
   
    val = constrain(val, 1, 100);                                                   
    val = map(val, 1, 100, 1, 255);        
                     
                                                                   
   }
   else
   {              
                                                                 
   }
     
                                                              
   if (val >= 36)
   {
    digitalWrite(ledPin, HIGH);
   }
  
  else
   {
    digitalWrite(ledPin,LOW);
   } 
 
 
    if (val >= 72)
   {
    digitalWrite(ledPin2, HIGH);
   }
  
  else
   {
    digitalWrite(ledPin2,LOW);
   } 
   
      if (val >= 108)
   {
    digitalWrite(ledPin3, HIGH);
   }
  
  else
   {
    digitalWrite(ledPin3,LOW);
   } 
   
      if (val >= 144)
   {
    digitalWrite(ledPin4, HIGH);
   }
  
  else
   {
    digitalWrite(ledPin4,LOW);
   } 
 
 
    if (val >= 180)
   {
    digitalWrite(ledPin5, HIGH);
   }
  
  else
   {
    digitalWrite(ledPin5,LOW);
   } 
 
 
    if (val >= 216)
   {
    digitalWrite(ledPin6, HIGH);
   }
  
  else
   {
    digitalWrite(ledPin6,LOW);
   } 
 
 
    if (val >= 255)
   {
    digitalWrite(ledPin7, HIGH);
   }
  
  else
   {
    digitalWrite(ledPin7,LOW);
   } 
 
 
 Serial.println(val);                         
 delay (500);
}

What kinds of values are being printed?

If it compiles, your problem isn't a syntax error.
It does compile, doesn't it?

When stationary the value stays zero like it should. I am thinking the problem is in the sensitivity because when I bring it close to an electrical socket the value only jumps into the 30s or 40s and then goes back down to zero. How would I go about fixing the sensitivity and should being close to an electrical socket be considered the max... Like all leds light up near an outlet?

AWOL:
If it compiles, your problem isn't a syntax error.
It does compile, doesn't it?

It will compile and run, I have worded this wrong in saying syntax error you are correct. I just meant I have an issue in the coding most likely being the sensitivity and values im using.

Are the same values printed with the initial code with one LED?

Simpler code, easier to modify.
(compiled but untested)

const byte inPin = 5;
const byte nLEDs = 7;
const byte ledPin [nLEDs] = {12, 11, 10, 9, 8, 7, 6 };
// thresholds in the range 0..1023 - so set them as you wish
// use the raw reading from the ADC, don't muck about with 
// map and constrain.
const int limits [nLEDs] = {36, 72, 108, 144, 180, 216, 255};  // just examples.
void setup() 
{
  for (int i = 0; i < nLEDs; i++) {
   pinMode(ledPin [i], OUTPUT);
  }
  Serial.begin(9600);
}

void loop() 
{
  int val = analogRead(inPin); 
  for (int i = 0; i < nLEDs; i++) {
   digitalWrite (ledPin [i], val >= limits [i]);
  }
  Serial.println(val);                         
  delay (500);
}

Thanks guys but I got my sketch running properly now. I shortened the delay in the println and instead of the values 1-100 being used i used 1-10 to make the emf detector much more sensitive.

Do you want me to tell you your bug(s) ? ( Much gooder)
(Please use PM, I do not want repeat of past encounters here.)
Or you want to figure it out yourself?
You may want to adjust the delay time for better visibility.

void loop() 
{
  int val = analogRead(inPin); 
  for (int i = 0; i < nLEDs; i++) {
    
   digitalWrite (ledPin [i], val=limits [i]);
   Serial.println(val);  
   delay (1500);
  }
  Serial.println(val);                         
  delay (500);
}
   digitalWrite (ledPin [i], val=limits [i]);

Bugs, you say?

Vaclav:
Do you want me to tell you your bug(s) ? ( Much gooder)
(Please use PM, I do not want repeat of past encounters here.)
Or you want to figure it out yourself?
You may want to adjust the delay time for better visibility.

void loop() 

{
 int val = analogRead(inPin);
 for (int i = 0; i < nLEDs; i++) {
   
  digitalWrite (ledPin [i], val=limits [i]);
  Serial.println(val);  
  delay (1500);
 }
 Serial.println(val);                        
 delay (500);
}

I admit, I'm beaten.
Come on Vaclav, clue us in - show us the bugs.