Sorry, there are a lot of problems in your code. The very first thing is that the C language does not allow functions to be defined inside other functions:
this is the reason for the error that started the thread
Besides this, there are other problems here.
For example, you can't set the same macro more than once - they simply won't work:
In general, before proceeding I recommend to review basic syntax concepts such as procedures, functions, code blocks, variable definitions and constants.