RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Try to make own menu option

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 83
I need help with this I try to found it out by my self but no results.
I just was playing around with it for a reason but that's top secret ;D
Spoiler for:
#==============================================================================
# ** Scene_Shop
#------------------------------------------------------------------------------
#  This class performs shop screen processing.
#==============================================================================

class Scene_Shop < Scene_Base
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    @status_window = Window_MenuStatus.new(160, 0) # LOOK HERE  how do i know what numbers
  end                                                                               # Come after it?
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    dispose_command_window
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = "Start"
    s3 = Vocab::ShopCancel
    @command_window = Window_Command.new(300, [s1, s3], 2)
    @command_window.y = 0
    if $game_temp.shop_purchase_only
      @command_window.draw_item(1, false)
    end
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      case @command_window.index
      when 1  # Start
        Sound.play_decision
        $scene = Scene_Map.new
      when 0  # Quit
        start_actor_selection #LINE 63
      end
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $scene = Scene_Status.new(@status_window.index)
        end
      end
    end
  end
end
end
end
I get the error: Script "menu editting" line 63: NameError occurred.
Undefined local variable or method 'start_actor_selection' for #<Scene_MenuOption:0x17c3718>
« Last Edit: March 10, 2010, 02:11:16 PM by atiebatie99 »
My work isn't really good because I'm just 14
year
My English isn't really good because I'm from Netherlands

***
Rep:
Level 82
aka DigiDeity
Hi.
Like the error says. You use the method "start_actor_selection" but you don't defined this method.
I think you copied some party from the "Scene_Menu" so I would copy the missing method also.

Code: [Select]
    @status_window = Window_MenuStatus.new(160, 0) # LOOK HERE  how do i know what numbers Come after it?
Do you mean (160,0) ?
Just look at the class you want to call and you'll find out.
Look at "initialize" and after this method are the needed parameter. In this case the x and y coordinate.

Deity
Greetings
DigiDeity

├Work┤
├Contact┤


*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Like Deity said, it was because your start_actor_selection was undefined. This is because your start_actor_selection was below your update_command_action. Or at least I think it's like that. Anyways, try this script.

Spoiler for:
#==============================================================================
# ** Scene_Shop
#------------------------------------------------------------------------------
#  This class performs shop screen processing.
#==============================================================================

class Scene_Shop < Scene_Base
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    @status_window = Window_MenuStatus.new(160, 0) # LOOK HERE  how do i know what numbers
  end                                                                               # Come after it?
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    dispose_command_window
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = "Start"
    s3 = Vocab::ShopCancel
    @command_window = Window_Command.new(300, [s1, s3], 2)
    @command_window.y = 0
    if $game_temp.shop_purchase_only
      @command_window.draw_item(1, false)
    end
  end
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      case @command_window.index
      when 1  # Start
        Sound.play_decision
        $scene = Scene_Map.new
      when 0  # Quit
        start_actor_selection #LINE 63
      end
    end
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $scene = Scene_Status.new(@status_window.index)
        end
      end
    end
  end
end


Also, your start_actor_selection didn't have an end. When you define things, you should always put an end at the end of your code. Hope this helps!