Introduction
Íž Íž Íž Íž Íž Íž Íž Íž Íž Íž Íž Íž
This plugin adds a fake error or crash screen that can be fully customized
to suit your game.
Styling is handled through CSS and can also be applied to real game crashes.
How to Use
Íž Íž Íž Íž Íž Íž Íž Íž Íž Íž
To open the fake crash screen, use: htmlError.open().
The available options are as follows:
title:
Adds a title to the crash screen (can be omitted if the title is "TypeError").
Each title can be styled individually in CSS, including color,
font size, and any other supported properties.
message:
Optional. Can be omitted depending on your needs.
stack:
Adds stack trace lines. Use "\n" for line breaks.
buttonText:
Sets the button text (can be omitted if the default is "Retry").
onRetry:
A function that is executed when the player clicks the button.
Example:
htmlError.open({
title: "TypeError",
message: "Your crash message",
stack: "Add multiple lines\nhere and on the next\nand the next...\nas many as you like!",
buttonText: "Crash Game",
onRetry: () => {
$gamePlayer.reserveTransfer(5, 7, 12, 2, 0);
// $gamePlayer.reserveTransfer(mapID, x, y, direction, fade);
}
});
You can also create a manual stack error sequence:
htmlError.open({
title: "ReferenceError",
message: "undefined is not a function",
onRetry: () => {
htmlError.open({
title: "LoadError",
message: "Failed to load: audio/bgm/ghost_theme.ogg",
onRetry: () => {
htmlError.open({
title: "LoadError",
message: "Endless loop error",
onRetry: () => {
// Exit cleanly, call a script, or chain more errors
}
});
}
});
}
});