pinMode (sensorPin = INPUT); //pin that the input fron LED
val = LOW;
Why aren't you at least trying to compile this, or at least reading the reference material provided?
"val" hasn't been defined, so assigning the value LOW to it is impossible.
myservo2.attach(11); // attaches the servo on pin 9 to the servo object
Clearly, it does no such thing.
Any clues as to what this comment // syntaxf 21c
means?
What is it you are trying to achieve here?
If you compiled this stuff, the compiler would give you errors, you would learn the meaning of those errors and move on and correct the code.
This is wasting time.