'lcd' does not name a type?

fixed!

Rather than just posting all your code badly, why not post the error message as well?

You need to put your setup code inside setup()