guitarshredderj
Member
Yeah, so I have an options menu, and as far as I can tell, I'm doing this right, but apparently not. I'm calling the menu using this code:Â $scene = Scene_Options.new....But it's not working. I keep getting an argument error. The error says
---------------------------------------------------------------------------------------------------------
Script 'Title Screen' line 312:ArgumentError ocurred
Wrong number of arguments(0 for 1)
---------------------------------------------------------------------------------------------------------
This is really annoying because I know it has nothing to do with the title. This options menu did the same exact thing in the demo when I got it. I'll note that this IS supposed to be an options menu for the title. But i have everything in my title set up correctly. The credits menu works fine, which is brought up the same way.($scene = Scene_Credits.new)Please help. My title screen is ALMOST complete. This is the last thing I need.
Here's the code for the options:
Here are the images that go with it.
---------------------------------------------------------------------------------------------------------
Script 'Title Screen' line 312:ArgumentError ocurred
Wrong number of arguments(0 for 1)
---------------------------------------------------------------------------------------------------------
This is really annoying because I know it has nothing to do with the title. This options menu did the same exact thing in the demo when I got it. I'll note that this IS supposed to be an options menu for the title. But i have everything in my title set up correctly. The credits menu works fine, which is brought up the same way.($scene = Scene_Credits.new)Please help. My title screen is ALMOST complete. This is the last thing I need.
Here's the code for the options:
Code:
#_______________________________________________________________________________
#Â Â Options Menu
#
#--------------------------------------------------------------------------
Â
class Window_OptionsClear< Window_Base
 def initialize
  super(170, 5, 300, 345)
  self.contents = Bitmap.new(width - 32, height - 32)
  self.opacity = 0
  self.contents.font.size = 24
  self.contents.draw_text(70, 0, 120, 32, "Options Menu")
  self.contents.draw_text(0, 20, 300, 32, "--------------------------------------------")
  self.contents.font.size = 16
  self.contents.draw_text(40, 40, 250, 32, "Keep on Equip Description Window")
  self.contents.draw_text(40, 60, 250, 32, "Toggle Face Support")
  self.contents.draw_text(40, 80, 250, 32, "Full Screen/Window Toggle")
  self.contents.draw_text(40, 100, 250, 32, "Help Mode")
  self.contents.draw_text(20, 135, 250, 32, "Volumes")
  self.contents.draw_text(50, 155, 250, 32, "Music Level")
  self.contents.draw_text(50, 170, 300, 32, "--------------------------------------")
  self.contents.draw_text(50, 185, 250, 32, "Sound Level")
  self.contents.draw_text(50, 200, 300, 32, "--------------------------------------")  Â
  self.contents.draw_text(20, 220, 250, 32, "Menu Background Skin")
  self.contents.draw_text(50, 240, 250, 32, "Default  1  2  3  4  5  6  7  8  9")
  self.contents.draw_text(20, 262, 250, 32, "Map HUD")
  self.contents.draw_text(50, 282, 280, 32, "Off    Normal Mode    Full Mode")
Â
 end Â
end
#--------------------------------------------------------------------------
Â
class Window_Options < Window_Base
Â
 def initialize
  super(170, 5, 300, 345)
  self.contents = Bitmap.new(width - 32, height - 32)
  self.opacity = 175
  refresh
 end
 #--------------------------------------------------------------------------
Â
  def refresh
  Â
  self.contents.clear
  self.contents.font.size = 16
  self.contents.draw_text(215, 170, 250, 32, "(" + $game_system.music_level.to_s + "%)")
  self.contents.draw_text(215, 200, 250, 32, "(" + $game_system.sound_level.to_s + "%)") Â
  y_spot = [40,60,80,100,155,185,220,262]
 Â
  i = $game_system.option_decision Â
  self.contents.draw_text(2, y_spot[i], 250, 32, "->")
 Â
  i = $game_system.music_level
  self.contents.draw_text(50 + 1.5*i, 170, 250, 32, "|")
  i = $game_system.sound_level
  self.contents.draw_text(50 + 1.5*i, 200, 250, 32, "|")Â
Â
  end
  end
 #--------------------------------------------------------------------------
class Scene_Options
Â
 def initialize(menu_index)
  $game_system.sound_music = 0
  $game_system.option_decision = menu_index
 end
Â
 #--------------------------------------------------------------------------
 def main
  @command_window = Window_Command.new(160,["Item", "Abilities", "Equipment", "Change Party", "Save Game", "End Game"])
  @command_window.opacity = 175; @command_window.x = 5; @command_window.y = 5
  @command_window.active = false
  @battler = Window_Battler.new   Â
  @gold_window = Window_Gold.new  Â
  @location_window = Window_Location.new
  @playtime_window = Window_PlayTime2.new
  @status_window = Window_MenuStatus2.new
  @sprite = Spriteset_Map.new
  @right_window = Window_RightCorner.new
  @options_window = Window_Options.new
  @options_window2=Window_OptionsClear.new
  s1 = [@checkmark1, @checkmark2, @checkmark3, @checkmark4, @checkmark5, @checkmark6, @checkmark7]
  s2 = [$game_system.version_104, $game_system.face_support, $game_system.full_screen, $game_system.help_mode]
  s3 = [40,60,80,100]
 Â
  for i in 0..3
    s1[i] = Sprite.new
   if s2[i] == 1
      s1[i].bitmap = RPG::Cache.picture("checked1.PNG")
   else
      s1[i].bitmap = RPG::Cache.picture("Unchecked.PNG")
   end
    s1[i].x = 205
    s1[i].y = s3[i] + 30
    s1[i].z = 1000
  end
Â
  s2= [146, 194, 303]
  for i in 0..2
    s1[i+5] = Sprite.new
    s1[i+5].bitmap = RPG::Cache.picture("Unchecked.PNG")
    if i == $game_system.map_hud
      s1[i+5].bitmap = RPG::Cache.picture("checked1.PNG")
    end
    s1[i+5].x = 70 + s2[i]
    s1[i+5].y = 312
    s1[i+5].z = 1000Â
  end
Â
  j = $game_system.windowskin_name.to_i
  s4 = Sprite.new
  if j == 0
  s4.bitmap = RPG::Cache.picture("Uncheckedlong.PNG")
  s4.x = 230
  elsif 0 < j and j <= 9
  s4.bitmap = RPG::Cache.picture("Unchecked.PNG")
  s4.x = 265 + j*19
  end
  s4.y = 270
  s4.z = 5Â
 Â
  if $game_system.save_disabled
    @command_window.disable_item(4)
  end
 Â
  Graphics.transition
  loop do
   Graphics.update
   Input.update
   update
   update_options
  Â
   if $scene != self
    break
   end
Â
  end
  Graphics.freeze
  @command_window.dispose; @status_window.dispose; @gold_window.dispose
  @playtime_window.dispose; @battler.dispose; @options_window.dispose
  @location_window.dispose; @sprite.dispose; @right_window.dispose #;@back1.dispose
  @options_window2.dispose; s4.dispose
 Â
  for i in 0..3
    s1[i].bitmap.dispose Â
  end
  for i in 5..7
    s1[1].bitmap.dispose
   end
Â
Â
 end
 #--------------------------------------------------------------------------
 def update
  @playtime_window.update; $game_system.update
  $game_system.char_max = $game_party.actors.size
 Â
  if Input.repeat?(Input::RIGHT)
    if $game_system.option_decision == 4
       $game_system.music_level += 5 Â
       $game_system.bgm_memorize
       $game_system.bgm_restore
       if $game_system.music_level >= 100
         $game_system.music_level = 100
       end
    elsif $game_system.option_decision == 5
       $game_system.sound_level += 5
       $game_system.bgs_memorize
       $game_system.bgs_restore
       if $game_system.sound_level >= 100
        $game_system.sound_level = 100
       end
    elsif $game_system.option_decision == 6
    i = $game_system.windowskin_name.to_i
    i = i+1
    if i == 10
     i = 0
    end    Â
    $game_system.windowskin_name = i.to_s
    $scene = Scene_Options.new(6)
    elsif $game_system.option_decision == 7
        $game_system.map_hud += 1
      if $game_system.map_hud == 3
        $game_system.map_hud = 2
      end
    end
    @options_window.refresh
    $game_system.se_play($data_system.decision_se) Â
  end
 Â
  if Input.repeat?(Input::LEFT)
   if $game_system.option_decision == 4
       $game_system.music_level -= 5
       $game_system.bgm_memorize
       $game_system.bgm_restore
        if $game_system.music_level <= 0
          $game_system.music_level = 0
        end
   elsif $game_system.option_decision == 5
      $game_system.sound_level -= 5
      $game_system.bgs_memorize
      $game_system.bgs_restore
        if $game_system.sound_level <= 0
          $game_system.sound_level = 0
         end
   elsif $game_system.option_decision == 6
    i = $game_system.windowskin_name.to_i
    i = i - 1
       if i == -1
         i = 9
       end     Â
    $game_system.windowskin_name = i.to_s
    $scene = Scene_Options.new(6)
    elsif $game_system.option_decision == 7
        $game_system.map_hud -= 1
      if $game_system.map_hud == -1
        $game_system.map_hud = 0
      end
    end Â
      Â
    @options_window.refresh
    $game_system.se_play($data_system.decision_se) Â
  end
 Â
  if Input.trigger?(Input::B)
   $game_system.se_play($data_system.cancel_se)
   $scene = Scene_Menu.new
   return
  end
Â
 end
 #---------------------------------------------------------------------------
 def update_options
 Â
 if Input.trigger?(Input::C)
  $game_system.se_play($data_system.decision_se)
 Â
  if $game_system.sound_music == 0
Â
   if $game_system.option_decision == 0
      if $game_system.version_104 == 1
        $game_system.version_104 = 0
      else
        $game_system.version_104 = 1
      end
    end
    if $game_system.option_decision == 1
      if $game_system.face_support == 1
        $game_system.face_support = 0
      else
        $game_system.face_support = 1
      end
    end
    if $game_system.option_decision == 2
      if $game_system.full_screen == 1
        $game_system.full_screen = 0
        $game_system.screen_size
      Graphics.update
      sleep 1.0
      else
        $game_system.full_screen = 1
        $game_system.screen_size
        Graphics.update
        sleep 1.0  Â
      end
    end
    if $game_system.option_decision == 3
      if $game_system.help_mode == 1
        $game_system.help_mode = 0
      else
        $game_system.help_mode = 1
      end
     @right_window.refresh
    end
    @status_window.refresh
    @options_window.refresh
Â
 end
end
Â
   s1 = [@checkmark1, @checkmark2, @checkmark3, @checkmark4, @checkmark5, @checkmark6, @checkmark7]
   s2 = [$game_system.version_104, $game_system.face_support, $game_system.full_screen, $game_system.help_mode]
   s3 = [40,60,80,100]
   Â
   for i in 0..3
    s1[i] = Sprite.new
     if s2[i] == 1
       s1[i].bitmap = RPG::Cache.picture("checked1.PNG")
     else
       s1[i].bitmap = RPG::Cache.picture("Unchecked.PNG")
     end
    s1[i].x = 205
    s1[i].y = s3[i] + 30
    s1[i].z = 1000
   end
Â
  s2= [146, 194, 303]
  for i in 0..2
    s1[i+5] = Sprite.new
    s1[i+5].bitmap = RPG::Cache.picture("Unchecked.PNG")
    if i == $game_system.map_hud
      s1[i+5].bitmap = RPG::Cache.picture("checked1.PNG")
    end
    s1[i+5].x = 70 + s2[i]
    s1[i+5].y = 312
    s1[i+5].z = 1000Â
  end
  Â
   if Input.repeat?(Input::DOWN)
    $game_system.option_decision += 1
    if $game_system.sound_music == 0
        if $game_system.option_decision == 8
          $game_system.option_decision = 0
        end
    elsif $game_system.sound_music == 1
        if $game_system.option_decision == 2
          $game_system.option_decision = 0
        end
    end
    $game_system.se_play($data_system.decision_se)
    @options_window.refresh
   end
  Â
   if Input.repeat?(Input::UP)
    $game_system.option_decision -= 1
    if $game_system.sound_music == 0
        if $game_system.option_decision == -1
          $game_system.option_decision = 7
        end
    elsif $game_system.sound_music == 1
        if $game_system.option_decision == -1
          $game_system.option_decision = 1
        end    Â
    end
    $game_system.se_play($data_system.decision_se)
    @options_window.refresh
  end
  Â
end
 #---------------------------------------------------------------------------
 def delay(seconds)
 Â
   for i in 0...(seconds * 1)
   sleep 0.01
   Graphics.update
   end
 Â
 end
 #--------------------------------------------------------------------------
end
Here are the images that go with it.
http://i435.photobucket.com/albums/qq77/guitarshredderj/Checked1.png[/img]
http://i435.photobucket.com/albums/qq77 ... erj/LE.png[/img]
http://i435.photobucket.com/albums/qq77 ... hecked.png[/img]
http://i435.photobucket.com/albums/qq77 ... edlong.png[/img]
http://i435.photobucket.com/albums/qq77 ... erj/LE.png[/img]
http://i435.photobucket.com/albums/qq77 ... hecked.png[/img]
http://i435.photobucket.com/albums/qq77 ... edlong.png[/img]