Function in CPP override in BP


I have a function in CPP and I want to be able to override it in Blueprints.

I made some research and found out that I can use “BlueprintNativeEvent”, so I tried out, but I get weird errors:

Can anyone help? I dont understand what is wrong

I dont have compiler errors anymore.

I added implementation of the function in cpp file:

But I cant see the function in override list in BP

Nevermind, it works