currsor problem

“Hello! I’m a beginner and I’ve been having an issue for some time now. I don’t understand why I keep getting this error, even though I’ve followed an online course and apparently created the Blueprint in the same way. However, I keep encountering this error and I can’t proceed. If anyone knows, please guide me. The error is: Blueprint Runtime Error: “Accessed None trying to read property K2Node_DynamicCast_AsPinball_Player_Controller_1”. Node: Branch Graph: EventGraph Function: Execute Ubergraph Pinball Game Mode Blueprint: pinball_game_mode.”

a) is pinball_game_mode set as the game mode in project preferences => Maps & Modes

b) inside of pinball_game_mode do you have your player controller set to pinball_player_controller

c) do you have a game mode override set in window => World settings (Game Mode Override should be set to none to have the one that is set in preferences)

p.s.
Remember to compile your blueprints (you have a yellow exclamation mark next to compile) sometimes errors show up because the interlinked blueprints are not compiled.

1 Like

Your player controller isn’t casting successfully, this is why we try to avoid pure casts :wink:

Have you got the game mode setup correctly ( where the controller is specified ).

1 Like

I checked everything you recommended point by point… everything is as it should be according to the recommendations. Thank you anyway!

Is the world setting game mode override set to “None” on the “Pinball vera rebuild” level?

1 Like

yes !

After inspecting the player controller, you seem to be trying to retrieve the 1 index. Player controller starts with index 0.

1 Like

Thank you very much for your help. I changed the index to 0 as you recommended. Unfortunately, now I’m facing a problem with spawning the ball; it no longer appears. In the course, I had to create a Mine Menu - widget that simply made the ball and the menu disappear. Being a beginner, it’s super frustrating. I’ll attach some BPs for spawning the ball and the new BP for the menu… I hope from your experience you can identify what the problem might be… I swear I’ll be deeply grateful and will follow you if you help me get out of this deadlock.


Try adding a break point on the ball_spawn function (F9) and walk through the function and see where it fails. Also do not do a pure cast for the pinball controller but a normal one and add a print string on fail to see if it passed the cast correctly.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.