Unknown variable specifier 'BlueprintNativeEvent'

Your TakeDmg() function is delcared as a UPROPERTY() in the header - if you change it to UFUNCTION(), it should work fine ^.=.^ Also, unless the function is specified as a serverside validated function - like this - you should not write it as TakeDmg_Implementation(), but as TakeDmg().

 UFUNCTION(Server, Reliable, WithValidation)

If you want to use the function in blueprint, add BlueprintCallable in the UFUNCTION declaration.

I’m having a strangely difficult time adding a BlueprintNativeEvent to my code. The compiler really doesn’t want to recognize the variable!

I am quite new to UE4 programming so please take it easy on me if it’s an obvious mistake :).

The code causing the problem is screenshotted. Everything I’ve added has been highlighted in RED.

I’m using version 4.5

The exact error I’m getting:

Error E:/Unreal Projects/SideScrollerExample1/Source/SideScrollerExample1/Public/SideScrollerExample1Character.h(27)  : Error: In SideScrollerExample1Character: Unknown variable specifier 'BlueprintNativeEvent'

Use UFUNCTION instead of UPROPERTY for TakeDmg and remove BlueprintReadWrite :slight_smile:

Amazing thank you so much. What a dumb question in hindsight -_-. I replaced BlueprintReadWrite with BlueprintCallable and changed UPROPERTY to UFUNCTION.

Compiling happily now. Thanks again!!

You’re welcome :slight_smile:

Thanks as well for the response! Same solution as above but I’ll give you some love too. I really appreciate the quick solutions!!!