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.

fixing a script

Tenchi

Member

class Window_Titlej < Window_Base

def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 36
self.contents.font.name = $fontface
self.opacity = 0
refresh
end

def refresh
self.contents.clear
self.contents.font.color = Color.new(255, 0, 0, 255)
self.contents.draw_text(10, 5, 180, 50, "Journal -")
self.contents.draw_text(6, 5, 180, 50, "Journal -")
self.contents.draw_text(8, 7, 180, 50, "Journal -")
self.contents.draw_text(8, 3, 180, 50, "Journal -")
self.contents.font.color = normal_color
self.contents.draw_text(8, 5, 180, 50, "Journal -")
end
end
#===============================================================================

class Window_Emptyj1 < Window_Base
 
  def initialize
    super(0, 0 , 0 , 0)
    end
  end
#===============================================================================

class Window_Emptyj2 < Window_Base
 
  def initialize
    super(0, 0 , 0 , 0)
    end
  end
#===============================================================================

class Scene_Journal
 
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
 
  def main
      @command_window = Window_Command.new(180,["Bestiary"])
      @command_window.index = @menu_index
      @command_window.x = 5
      @command_window.y = 55
      @command_window.height = 130
      @command_window.width = 180
      @command_window.back_opacity = 180
     
      @sprite = Spriteset_Map.new
     
      @title_window = Window_Titlej.new
      @title_window.x = 0
      @title_window.y = -20
      @title_window.z = 1000
     
      @empty1_window = Window_Emptyj1.new
      @empty1_window.x = 190
      @empty1_window.y = 55
      @empty1_window.z = 110
      @empty1_window.height = 420
      @empty1_window.width = 446
      @empty1_window.back_opacity = 180
     
      @empty2_window = Window_Emptyj2.new
      @empty2_window.back_opacity = 180
      @empty2_window.x = 5
      @empty2_window.y = 190
      @empty2_window.height = 285
      @empty2_window.width = 180
     
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
   
    Graphics.freeze
    @command_window.dispose; @sprite.dispose; @empty2_window.dispose
    @empty1_window.dispose; @title_window.dispose
  end
  #--------------------------------------------------------------------------
 
  def update
  @command_window.update
  @title_window.update
  if @command_window.active
    update_command
  end
end
  #--------------------------------------------------------------------------
 
  def delay(seconds)
    for i in 0...(seconds * 1)
      sleep 0.01
      Graphics.update
    end
  end
  #--------------------------------------------------------------------------
 
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_menu.new(0)
      return
    end
   
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0
        $scene = Scene_MonsterBook.new
      end
        $game_system.se_play($data_system.decision_se)     
      return
    end
  end
end

when i exit the menu of this script in game it give me this error:

"Script 'Scene_Journal' line 115: NameErorr occurred.

uninitialized constant Scene_Journal::Scene Menu"

ummmmm, ok, if u know how to fix it then just tell me

P.S: im using RMXP
 

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