Open the Animation where the error occurred, and select the AnimationEvent.

An Inspector like the one below will appear on the right.

The cause is probably that a function with the same name cannot be found, so writing the same function will solve it.
