I have this snippet that is saving:
And this snippet that is loading:
But when it tries to load I get this odd error:
Anyone have any ideas?
Code:
def self.save
begin
#Saves the file to whatever $game_system.filename is
file = File.open("preferences.rxdata", "wb")
a = Scene_Save.new
a.write_save_data(file)
ensure
file.close
end
end
And this snippet that is loading:
Code:
def read_save_data(file)
# Read character data for drawing save file
# characters = Marshal.load(file)
# Read frame count for measuring play time
Graphics.frame_count = Marshal.load(file)
# Read each type of game object
$game_system = Marshal.load(file)
$game_switches = Marshal.load(file)
$game_variables = Marshal.load(file)
$game_self_switches = Marshal.load(file)
$game_screen = Marshal.load(file)
$game_actors = Marshal.load(file)
$game_party = Marshal.load(file)
$game_troop = Marshal.load(file)
$game_map = Marshal.load(file)
$game_player = Marshal.load(file)
# If magic number is different from when saving
# (if editing was added with editor)
if $game_system.magic_number != $data_system.magic_number
# Load map
$game_map.setup($game_map.map_id)
$game_player.center($game_player.x, $game_player.y)
end
# Refresh party members
$game_party.refresh
end
But when it tries to load I get this odd error:
TypeError occurred.
incompatible marshal file format (can't be read)
format version 4.8 required; 112.114 given
Anyone have any ideas?