No idea how to get a party script working

I have no experience with coding or game dev, all i want is to be able to switch around the party members to make my first game.


The script I'm trying to use
Spoiler: Party script
[/SPOILER ]

1708719874496.png


this is the error message when I use $scene = Scene_Party.new

The only lines of code that were added besides the script above is
1708720973276.png

and
1708721031012.png

both in the Scene_Menu script

I think I've followed the steps correctly but clearly something is wrong.
1) where did you add the script?
2) did you start a new game after adding the script?
1)After the code in Main, i tried putting it separately above the Main script with the same result
2)Yes
Well, you could use this modification of the Scene_Menu script. Make sure you paste it as a new script in its own script slot.

Ruby:
# * Scene_Menu For Party Changer Script * #
#   2024-02-24

class Scene_Menu
  def initialize(menu_index = 0)
    @menu_index = menu_index
    @options = []
    @options << $data_system.words.item
    @options << $data_system.words.skill
    @options << $data_system.words.equip
    @options << "Status"
    @options << "Party"
    @options << "Save"
    @options << "End Game"
  end

  def make_windows
    # Make command window
    @command_window = Window_Command.new(160, @options)
    @command_window.index = @menu_index
    # Make play time window
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = 224
    # Make steps window
    @steps_window = Window_Steps.new
    @steps_window.x = 0
    @steps_window.y = 320
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416
    # Make status window
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
  end

  def reset_command_window_options
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # If save is forbidden, disable save
    if $game_system.save_disabled
      @command_window.disable_item(4)
    end
  end

  def main
    make_windows
    reset_command_window_options
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    terminate
  end

  def terminate
    @command_window.dispose
    @playtime_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end

  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # Party Change
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_Party.new
      when 5  # save
        # If saving is forbidden
        if $game_system.save_disabled
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to save screen
        $scene = Scene_Save.new
      when 6  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
    end
  end
end

The curious thing is that I never got any of those errors while testing the script.

Original thread: https://forums.rpgmakerweb.com/threads/no-idea-how-to-get-a-party-script-working.166099/