CNC offline contollers

I have a cnc offline controller GRBL script, not written by me and I know it should work. It uses a UNO+LCD2004 with I2C board+ 4x4 keypad. The issue is compiling: I have tried different computers different UNO boards, as of yet I just keep having problems. Any help wood make my day.
A function- definition is not allowed here before ‘{‘ token

If you’re using the IDE, it should indicate which line the problem is on. I’ve often seen this happen when there’s an extra brace { or } in the code. Posting your code would allow for a more specific answer, but make sure to use code tags so it’s readable and helpful.

Double-check your braces {} to ensure they match properly.

Since you’re experiencing the same issue with different but comparable tools, it’s reasonable to conclude that this is likely a code problem. Debugging step by step and validating the structure will help resolve it.

This is wayyyyy tooooo lesssss information to exactly say what is going on