F12 Stack Level Too Deep Fix
Authors: ThallionDarkshine, CoderPuppy
Version: 1.1
Type: Error Fix
Key Term: Misc Add-on
IntroductionHave you ever been really annoyed when you press F12 to restart your game, and all of a sudden, a Stack Level Too Deep error appears? Well, this will fix that.
Features
- Fix those annoying stack level too deep errors when using the F12 restart.
ScreenshotsNot necessary. I can't think of how to show the absence of an error.
DemoNot at the moment, pretty self-explanatory.
ScriptPlace at the top of the script list before anything else.
if Graphics.frame_count > 0
begin
# Prepare for transition
Graphics.freeze
# Make scene object (title screen)
$scene = Scene_Title.new
# Call main method as long as $scene is effective
while $scene != nil
$scene.main
end
# Fade out
Graphics.transition(20)
rescue Errno::ENOENT
# Supplement Errno::ENOENT exception
# If unable to open file, display message and end
filename = $!.message.sub("No such file or directory - ", "")
print("Unable to find file #{filename}.")
end
exit
end
InstructionsNone needed. The script is pretty self-explanatory.
CompatibilityNo known issues.
Credits and Thanks
- ThallionDarkshine
- CoderPuppy (my brother) for the idea (which is basically all the script is)
Author's NotesNone. Use freely, no credit necessary.
Much simpler is the thing most people do, which I think Blizz came up with...
if $game_exists
Thread.new {system('Game')}
exit
end
$game_exists = true
Doesn't matter what scripts have been changed, removed, or added.
at least this one didn't spawn any game.exe
True.
A suggestion would be to use something other than checking if Game_Temp has been defined or not. Although the vast majority of projects will of course include this class, there are other things to check that won't require the dependency. One idea off the top of my head is to check if the Graphic.frame_count is greater than 0 or something. All projects, no matter what they are will have to update the Graphics, so it would remove other script dependency.
Alright, updated to version 1.1. Now it used the Graphics.frame_rate.
Quote from: ThallionDarkshine on November 08, 2013, 09:13:11 pm
Compatibility
Will not work if the Game_Temp script is removed.
you're not editing that part?