script call for new game?

At the end of my game; which I'm nowhere near, I'd like to use a script call to reset the game. (Exactly like when you choose new game from the menu).

I tried looking through the main js files in the js folder but I don't understand that enough to find what I'm looking for.

Thank you for any help.
DataManager.setupNewGame()
DataManager.setupNewGame()
Thank you. I actually tried that earlier but I left out the (). I didn't realize that was part of it.

I just tried this and I keep getting an "Cannot read property 'filter' of undefined" error when I try and use it.
Thank you.

I actually tried that earlier but I left out the (). I didn't realize that was part of it.

I just tried this and I keep getting an "Cannot read property 'filter' of undefined" error when I try and use it.
It happens to me when i use Plugin command

it works when i use script

Edit: I think the problem when you use it fast 
I was using the script call command to run it. It still gives me the error.

Edit: I keep getting that error, in the developers window it says its related to "rpg objects.js"

Here's an image of the problem I'm having. I've already turned off the two plug-ins it shows there, the issue still the same, just minus those two plug-ins.

newGameError.png
I was using the script call command to run it. It still gives me the error.

Edit: I keep getting that error, in the developers window it says its related to "rpg objects.js"

Here's an image of the problem I'm having. I've already turned off the two plug-ins it shows there, the issue still the same, just minus those two plug-ins.

View attachment 27414
Sorry to resurrect your thread from a million years ago, but if by any chance you still need a solution to this, I posted my way of doing it here: https://forums.rpgmakerweb.com/index.php?threads/rmmv-new-game-script-call.98497/post-1264285

Oatilis, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/script-call-for-new-game.53041/