# Loading a game from my main menu 

**URL:** <https://forums.unrealengine.com/t/loading-a-game-from-my-main-menu/2021200>\
**Category:** Programming & Scripting\
**Tags:** savegame, load, unreal-engine, Blueprint\
**Created:** [September 14, 2024, 10:49pm UTC](https://forums.unrealengine.com/t/loading-a-game-from-my-main-menu/2021200 "2024-09-14T22:49:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbachiiir](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sbachiiir](https://forums.unrealengine.com/u/sbachiiir)\
**Post date:** [September 14, 2024, 10:49pm UTC](https://forums.unrealengine.com/t/loading-a-game-from-my-main-menu/2021200/1 "2024-09-14T22:49:44Z")

</div>

Hello, quick question. I’m trying to load a saved game from my main menu. I’m calling the load function we created in the course, but I’m unable to cast to the Third Person Game Mode to load. i need to cast beacause its the only way to access to load fonctiun (it print nup)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/c/c/ccc8975e2ec370f22e91dfadbe20b9200ee6e702.png)

---

<div class="post-metadata">

**Author:** ![dZh0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dZh0](https://forums.unrealengine.com/u/dZh0)\
**Post date:** [September 14, 2024, 11:03pm UTC](https://forums.unrealengine.com/t/loading-a-game-from-my-main-menu/2021200/2 "2024-09-14T23:03:20Z")

</div>

Hover over the blue “NOTE” stripe and note what it says. (I’m assuming type mismatch) Which leads to: what type is the Game Mode variable you are trying to cast? Where is it set? Is it valid?

---

<div class="post-metadata">

**Author:** ![isikdev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/isikdev/32/991020_2.png) [@isikdev](https://forums.unrealengine.com/u/isikdev)\
**Post date:** [September 15, 2024, 12:19am UTC](https://forums.unrealengine.com/t/loading-a-game-from-my-main-menu/2021200/3 "2024-09-15T00:19:15Z")

</div>

The NOTE probably indicates that the input pin “GameMode” variable you are using is already of type BP\_ThirdPersonGamemode class. You can use “Get Gamemode” as the input for the cast instead.

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [September 15, 2024, 2:25pm UTC](https://forums.unrealengine.com/t/loading-a-game-from-my-main-menu/2021200/4 "2024-09-15T14:25:16Z")

</div>

A better way to do this would be to setup a game instance, and create a saved game variable inside of it, and call this functionality from that, you should be calling load game from save game class
