!! RPG GAME VX ACE Cmd Custom Error Message ------- 1.2 Material Script

RPG GAME VX ACE Cmd Custom Error Message Script​
def show_windows_error(message, title="Error", buttons=0)
# Create a VBScript command to show a message box with customizable title and buttons
vbscript = <<-VB
Set objShell = CreateObject("WScript.Shell")
result = objShell.Popup("#{message}", 0, "#{title}", #{buttons})

' If "OK" is clicked or any button, game will exit
If result >= 1 Then
WScript.Echo "Button clicked, exiting game..."
End If
VB

# Write the VBScript to a temporary file
file = File.open("temp_error.vbs", "w")
file.write(vbscript)
file.close

# Run the VBScript using the system command
system("cscript //nologo temp_error.vbs")

# Delete the temporary VBScript file after use
File.delete("temp_error.vbs")

# Close the game after the error is acknowledged
SceneManager.exit
end
How to Use:
  1. Paste the Script: Paste the entire script into the Script Editor of your RPG Maker VX Ace project.
  2. Call the Script in an Event:
    • In an event, use the Script command and call the show_windows_error function.
    • Example
    • show_windows_error("Error's mean", "Title", 4)
  3. Testing: When the event is triggered:
    • A Windows error message will appear with your custom message, title and icon.
    • After clicking OK, the game will close.
Wow, is updated?

Ekran görüntüsü 2025-02-23 160100.png
Ekran görüntüsü 2025-02-23 160017.png



No, l just... Broke the post! Okay... Just...
Hi there @MainPurpleZ what are the terms of use?
Hi there @MainPurpleZ what are the terms of use?
Hi there. If, l breaking rules of this website, delete this post or ban me.


But if you are talking about my project, then there is only one condition. This is for all projects who use this script.

1. DO NOT USE LIE-CREDITS
You accept the agreement that you will not lie about what YOU CREATED THIS SCRIPT or YOU WROTE THIS SCRIPT. If you want me write me in CREDITS MENU then write to me by email or write to RPG MAKER FORUM.
===============

I will be glad who will use this script. I tried and constantly reworked this script due to problems with CMD.

Thanks, Alex.
We wouldn’t ban you for that, but thank you for the information on your terms.
I gonna fix the post. This is a big chaos in the my post.

Original thread: https://forums.rpgmakerweb.com/threads/rpg-game-vx-ace-cmd-custom-error-message-1-2-material-script.175761/