On rep Notify should not be called from a blueprint - bug ?

I have a variable that has on rep notify set. This was working without issue, until 5.4.4 now compiling a blueprint that tries to set this variable results in a compilation fail and the cryptic message:

OnRep notify should not be called from a blueprint.

Is anyone else seeing this ?

You do not call it manually.

You need to change the variable that is associated with it, on the server. It will then trigger the onrep notify function on the relevant clients.

How did you make the on rep notify function? In pure blueprints or in c++?

Inside of CallfunctionHandler.cpp (line 1009) that is responsible for the message is a comment

// Verify that the function is a Blueprint callable function (in case a BlueprintCallable specifier got removed) 

This is just above the part that is triggering your error message.

Maybe it’s due to a mix of c++ and blueprints? (I usually use pure c++ for rep notifies so haven’t seen this message yet personally)

Could it be that you had the onrep done first in blueprints and then you implemented the override in c++ causing a conflict in the interpretation of the function?

If your ufunction is in pure c++ then try making it blueprint callable

The thing is I am not calling it directly all I am doing is setting the variable …

So I don’t understand the error, also as stated, the blueprints used to compile without error.

is the project pure bp? If so then maybe set the onrep notify to none and then back and recreate the function. Maybe it’s a bp corruption.

3dRaven

It would appear that did the trick… I love unreal but sometimes its too quirky… :stuck_out_tongue:

Yeah it’s a love/hate relationship for sure :wink:

1 Like