Newbie error code

Yea i got auto format already and still got "expected '}' at end of input".

and for where the loop ends i have no answer for that lol.