My delegate function keeps throwing errors. What could be the reason?

The error is literally telling you what the problem is: you’re missing a ‘;’ before the UCLASS macro. You need to add one to the end of the line that has the delegate macro.