Serial does not name a type error

hi guys i need help with my project my project is awith ir sender turn on a light and when a toy car pass the light turn off my problem is that : Serial' does not name a type
and i dont know the problem

There is a mistake in your sketch or in your settings. If you show ALL of the messages we might have a guess as to what the mistake is.

And post the program that produces the error messages.

What Arduino board are you using?

...R