help with custom menu

so i made a custom menu for a game i was making and have searched everywhere for a way to make a new game via script calls, but i couldn't find it.

basically, you click a button and the new game script is called, making a new save file.

by the way i already tried copypasting this from Scene_Title.

def command_new_game
DataManager.setup_new_game
close_command_window
fadeout_all
$game_map.autoplay
SceneManager.goto(Scene_Map)
end

there arent any errors, just nothing happens.
Moved to: RGSSx Script Support

That's just defining a method that doesn't belong to any class. You're not executing anything.

Show us where you've put this. And where you're calling it.
Moved to: RGSSx Script Support

That's just defining a method that doesn't belong to any class. You're not executing anything.

Show us where you've put this. And where you're calling it.
1680535977620.png

basically you click the button and it's supposed to make a new game.

(this is my first time doing this type of thing)
WAIT I JUST REALIZED THAT I COULD JUST TRANSFER TO A MAP AND CALL A SAVE COMMAND-

yeah i wasnt lying when i said im new to this :|

(i dont really even need the save either-)
Double-post notice: @Koiby

Yeah, that script call is doing absolutely nothing. Change it to this:

Code:
DataManager.setup_new_game
fadeout_all
$game_map.autoplay
SceneManager.goto(Scene_Map)

I'm not even sure if that will work, as it's meant to be run from the title screen, not from within a game. You might get an error or it might do weird things.

I don't really know what your last post was about, in relation to this thread. Calling the save command and starting a new game are two different things.
alright i might try that method (also sorry for doubleposting aaa)

Original thread: https://forums.rpgmakerweb.com/threads/help-with-custom-menu.156367/