Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

RGSS2 Save with active message

I recently decided to make a Visual Novel with VX, and as it exists mostly out of text messages, it would be best to let the player access the menu whenever they wanted to, so they can save etc. So I added and removed some lines from Window_Message, and the accessing works. There's only one thing that isn't working, and that's saving. The edits I made to Window_Message is here:

Code:
  #--------------------------------------------------------------------------
  # * Text Advancement Input
  #--------------------------------------------------------------------------
  def input_pause
    if Input.trigger?(Input::C)
      self.pause = false
      if @text != nil and not @text.empty?
        new_page if @line_count >= MAX_LINE
      else
        terminate_message
      end
    end
    if Input.trigger?(Input::B)
      $scene = Scene_Menu.new
    end
  end
I use this instead of the standard Text Advancement Input. So when I try to save, it gives this error:

http://img258.imageshack.us/img258/8917/errorfe3.png[/img]

And it's this line that gives the error, in Scene_File:

Code:
  #--------------------------------------------------------------------------
  # * Write Save Data
  #     file : write file object (opened)
  #--------------------------------------------------------------------------
  def write_save_data(file)
    characters = []
    for actor in $game_party.members
      characters.push([actor.character_name, actor.character_index])
    end
    $game_system.save_count += 1
    $game_system.version_id = $data_system.version_id
    @last_bgm = RPG::BGM::last
    @last_bgs = RPG::BGS::last
    Marshal.dump(characters,           file)
    Marshal.dump(Graphics.frame_count, file)
    Marshal.dump(@last_bgm,            file)
    Marshal.dump(@last_bgs,            file)
    Marshal.dump($game_system,         file)
    Marshal.dump($game_message,        file) <------ This is the line
    Marshal.dump($game_switches,       file)
    Marshal.dump($game_variables,      file)
    Marshal.dump($game_self_switches,  file)
    Marshal.dump($game_actors,         file)
    Marshal.dump($game_party,          file)
    Marshal.dump($game_troop,          file)
    Marshal.dump($game_map,            file)
    Marshal.dump($game_player,         file)
  end

The things I'd like to know are: Why does this error show, and what can I do to to fix it(except for deleting the line)?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top