Load file error dialog
#1
If a save file has become corrupted or something else causes the load process to fail you can use this script to display the error and allow the player to select another save.
You need my Dialog System. (Only the system, not the yes/no dialog present in that topic)
You also need this ok dialog
Dialog_Ok

Then its just to insert this script somewhere above main and below Dialog_Ok

Code:
# Error message on corrupt files
# by Zeriab
# Requires Dialog System and Dialog_Ok

#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
#  This class performs load screen processing.
#==============================================================================

class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # * Decision Processing
  #--------------------------------------------------------------------------
  unless self.method_defined?(:zeriab_load_on_decision)
    alias zeriab_load_on_decision on_decision
  end
  def on_decision(filename)
    begin
      # The original call
      zeriab_load_on_decision(filename)
    rescue Exception => error
      # Play buzzer SE
      $game_system.se_play($data_system.buzzer_se)
      # Show error message
      Dialog_Ok.show(error.message)
    end
  end
end
Note that this will not prevent errors from crashing the game if Window_SaveFile fails to read the little portion of the save file it needs.

*hugs*
- Zeriab
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   SLOLS: Snake Look-alike on Load Script Zeriab 3 11,463 05-14-2017, 06:25 PM
Last Post: LiTTleDRAgo
   Moghunter Menus: Scene File Ayumi DerVVulfman 4 14,608 07-28-2016, 05:13 PM
Last Post: Djigit
   File Missing Error Preventer xnadvance 0 6,031 05-29-2011, 05:24 AM
Last Post: xnadvance
   Audio File Encryption Dark-Yen 0 5,428 03-08-2008, 06:35 AM
Last Post: Dark-Yen
   Error Log Exsharaen 0 4,766 03-07-2008, 06:53 PM
Last Post: Exsharaen
   Dialog System Zeriab 0 4,713 03-06-2008, 06:03 AM
Last Post: Zeriab
   Loading Data from File Trickster 0 5,260 03-02-2008, 06:04 AM
Last Post: Trickster



Users browsing this thread: 2 Guest(s)