The issue is with GameMode Value as it isn't being picked up my def Start_the_GameV2 and just need help to allow the code to continue through the pages
```import pygame, pygame_menu
GameMode = "ShotMaking"
def Starting_Menu():
pygame.init()
surface = pygame.display.set_mode((1920, 1080))
menu = pygame_menu.Menu('BATTLESHIPS', 1920, 1080,
theme=pygame_menu.themes.THEME_GREEN)
menu.add.button('Play', start_the_game)
menu.add.button('LeaderBoard', LeaderBoard)
menu.add.button('Quit', pygame_menu.events.EXIT)
menu.mainloop(surface)```
This is where the diffculty slider is transferred to what gamemode ```def set_difficulty(value, difficulty, GameMode): if difficulty == 1: GameMode = "ShotMaking" else: GameMode = "Ai Oppoent" return GameMode
def LeaderBoard():
pass
def start_the_game():
pygame.init()
surface = pygame.display.set_mode((1920, 1080))
gamemenu = pygame_menu.Menu('BATTLESHIPS', 1920, 1080,
theme=pygame_menu.themes.THEME_DARK)
gamemenu.add.button('Back', Starting_Menu)
gamemenu.add.text_input('Username :', default='')
gamemenu.add.text_input('Passcode :', default='')
gamemenu.add.selector('Mode :', [('Shot Making', 1), ('Ai Opponant', 2)], onchange=set_difficulty)
gamemenu.add.button('Play', Start_The_GameV2)
gamemenu.mainloop(surface)```
This is the subroutine where the code fails
```def Start_The_GameV2(): pygame.init() surface = pygame.display.set_mode((1920, 1080))
gamemenuv2 = pygame_menu.Menu('BATTLESHIPS', 1920, 1080,
theme=pygame_menu.themes.THEME_DARK)
gamemenuv2.add.button("Continue", GameMode)
gamemenuv2.add.button('Back', start_the_game)
gamemenuv2.mainloop(surface)
Starting_Menu()```