A sketch is often like this:
includes
defines
global variables
setup function
loop function
extra functions
Could you also press Ctrl+T in the Arduino IDE to auto format the source code.
Then check every indent, every comma, every space, and make the source code look good.