About exit game Rpgmaker MV?

I know that to exit Rpgmaker MV , there's a script call --- SceneManager.exit();

Thing is I am using "SRD super tools engine" plugin and this plugin is interfering with this script call.
By interference , i mean whenever the script call is executed , the game freezes up instead of closing.

Upon disabling the plugin, the game exits perfectly. Any help would be appreciated on this?

Thanks in advance.

( Tested it on a test project too , where only script call and the plugin are present ).
( Also tried another script call --- window.close(this) but same interference. If I disable SRDsupertool, then it works. )

----------Console log cant be attached as executing the script call , consoles exits itself---------------
Instead using that script call try this one:

window.close(this) or close.bind(this)

- window.close(this) - you can use it practicly everywhere (probably force exit - not sure)
- close.bind(this) - used in some plugins as eval parameter (SRD's Title customizer plugin uses that script call to close game)

//Corect me if I'm wrong...
The same happens if you try to close the windows X button.
I tried to close the game window with without opening the console and it stays open.

Edit:
It was my mistake with another plugin, sorry for the mistake.
Instead using that script call try this one:

window.close(this) or close.bind(this)

- window.close(this) - you can use it practicly everywhere (probably force exit - not sure)
- close.bind(this) - used in some plugins as eval parameter (SRD's Title customizer plugin uses that script call to close game)

//Corect me if I'm wrong...
Thanks but i already tried those( mentioned in my post too). No luck.
Try calling SceneManager.popScene() before the call to exit().
@asplly97 you used window.close() script, I added directive this into brackets, like it should be used.
If @Trihan's method also fails, then show us your plugin list, maybe there is something that might override something in code.
For me it worked using only:
window.close();

You only need to modify the lines that prevent closing with window.confirm

close-window.png
For me it worked using only:
window.close();

You only need to modify the lines that prevent closing with window.confirm

View attachment 191788
what is your rpgmaker mv version 1.6.1 or 1.6.2 ? And also are you using the default njws of rpgmaker or updated one?
Are 1.6.2.

Check your NW.js version:
Code:
process.versions.nw

But my projects made with 1.6.1 didn't update themselves, I had to uninstall it on the Steam console and reinstall the RMMV.

Then I created a new project and copied the JS files for each project made with the previous version.
Sorry for late reply. Was trying various combinations unless a thought came across and it worked. Thing is the bug occured in playtest mode but not in deployed game build ( wish it came across earlier ) , so all good.

So , to sum it up, using SceneManager.exit() along with SRD_supertoolsengine plugin works fine in deployed build but not in playtesting mode for 1.6.1 rpgmaker mv.
I don't want to upgrade to 1.6.2 because who knows what plugin it might break.


Thank You, @Dev_With_Coffee , @Soulrender and @Trihan for your replies.
The script has a function that prevents the game from closing in test mode from what I saw in the code, but for some reason the window is not opening for you.

Edit:
Maybe this is important information, I managed to freeze the game screen through a test.
I changed the name of the index.html file to game.html and created an index.html that opens the game in an IFRAME.

In conclusion, the game freezes because the confirmation window does not appear in the "parent" window if it comes from an IFRAME, probably for safety.
The Plugin author used this method to prevent the user from closing the game window before saving the SRD_SuperToolsEngine data and closing the menu.

I assume you don't embed with IFRAME, but I thought it was important to show this test.

Good luck @asplly97
The Plugin author used this method to prevent the user from closing the game window before saving the SRD_SuperToolsEngine data and closing the menu.

Adding this for reference.

What finally worked to close the game in test play mode with this plugin enabled:
Code:
var gui = require('nw.gui');
var win = gui.Window.get();
win.close();

Original thread: https://forums.rpgmakerweb.com/threads/about-exit-game-rpgmaker-mv.137318/