I keep getting a syntax error saying my function needs and end, but I don't know why?

there is one end missing here

5 Likes