Calling events of other bp with input type same as caller bp generates errors on standalone games

Calling an event of another blueprint with an input type that’s the same as the type of the calling blueprint generates errors in the log when playing as a standalone game or mobile (preview).
It does work when playing in the editor.

The error occurs even when not setting the argument (see first image)!

And it causes the entire calling blueprint to not work anymore.

I discovered it on a new game i’m working on (mobile game):

[2014.08.20-22.13.56:084][  0]LogBlueprint:Error: [compiler] Error Function 'OnPersonTap_Fail' called from  OnPersonTap_Fail  should not be called from a Blueprint
[2014.08.20-22.13.56:084][  0]LogBlueprint:Warning: [compiler] Warning [0005.05] Compile of Person_Fail failed. 1 Fatal Issue(s) 0 Warning(s) [in 1 ms]

Then i tried a standalone game of another (much bigger) game i’m working on, gives the same error:

[2014.08.20-22.45.18:121][  0]LogBlueprint:Error: [compiler] Error Function 'StartDispensing' called from  StartDispensing  should not be called from a Blueprint
[2014.08.20-22.45.18:122][  0]LogBlueprint:Warning: [compiler] Warning [0026.23] Compile of BallDispenserButton failed. 1 Fatal Issue(s) 0 Warning(s) [in 3 ms]

Any ideas what’s going on? Is there a workaround for this?

Hi Rens2Sea,

I’m a bit confused as to what is going on here. The event is being called as a function in another blueprint, I’m assuming this other blueprint is the first image, correct? If so what you are missing is your cast to node. You need to cast to the first blueprint (drag off of the game variable and type in cast to), then you should be able to bring in the function without a problem. Currently it seems that it is trying to use the function but doesn’t know where to pull the information from, which would explain the error you are receiving.

Blueprint A has a variable named “Game” (public and exposed on spawn) with type of blueprint B.
Blueprint B has a custom event with an argument of type blueprint A (See image 2).
Blueprint A has a touch event in which the custom event from blueprint B gets called. (See image 1)

No casting should be required because the type is already known.

If you could humor me for a minute. I am fairly certain that you need to cast in this instance. In the situation, the blueprint knows the variable type, however it does not know to pull functions from the other blueprint, or where those functions are coming from. The cast to feeds the blueprint this information.

Hi Rens2Sea,

We have not heard from you in quite some time. I am marking this thread as answered for tracking purposes. If you are still experiencing this error, please comment here to let us know. Thank you.

We’re having similar issue on our project in 4.6.1. Game works flawlessly in editor but it gets bugged in standalone game.

Hi Ragethunder,

Have you made certain that both your game mode in Project Settings and the World Settings are set to your custom game mode along with custom player controller, pawn, hud, etc?

Yeap, it’s just that custom events and functions eith same code act differently in standalone than in editor

Can you post a screenshot of the blueprints in question so I can see your setup? Thank you!