"function-definition is not allowed" error

OK I'll do that with the code, and I changed the i to i++. Now it works.