Error 454 - END FUNCTION expected

END FUNCTION expected - A FUNCTION block was not terminated with a corresponding END FUNCTION statement; or another block terminating statement (for example, WEND or LOOP) was encountered when an END FUNCTION statement was expected.