Coding error

Hi I am pretty new to arduino and coding. I have been given this code to program into my arduino but I’m getting a error how do I fix this?

I am trying to program my arduino so when I push a button the servo motor will go from 0 to 180 and return any help will be appreciated thanks!

Post the code and the complete error message as described in How to use this forum as text in code tags NOT as a picture.

You might also want to do a search in the forum because we seem to have had quite a few people with exactly the same requirement lately. Is this perhaps a school project?

Steve

pinMode needs to be called in a function.