| 
 
| 赞 | 0 |  
| VIP | 1 |  
| 好人卡 | 0 |  
| 积分 | 1 |  
| 经验 | 1773 |  
| 最后登录 | 2014-4-18 |  
| 在线时间 | 8 小时 |  
 Lv1.梦旅人 ℃ake
	梦石0 星屑50 在线时间8 小时注册时间2009-6-6帖子787 | 
| 
本帖最后由 奶油Da蛋糕 于 2009-8-17 14:37 编辑
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  
 自己写了段脚本,写一半测试发现不能用。
 就是想做一个退出游戏的窗口。
 按了×之后不退出,进入界面。
 界面里介绍。
 “您的存档次数为XXX”
 [快速存档] [确认退出] [返回游戏]
 
 ---------------------------
 梦想逍遥游
 ---------------------------
 执行脚本时发生 ArgumentError 。
 
 wrong number of arguments(1 for 0)
 ---------------------------
 确定
 ---------------------------
 
 运行之后发现这个
 翻译之后是:执行脚本时发生 ArgumentError 。
 错误的号码arguments(1对于 0)
 复制代码def exit
$scene = Scene_Exit.new
end
class Window_Exit
    def initialize
    super(100, 128, 640-200, 352-50)
    self.windowskin = RPG::Cache.windowskin("002-xycs.png")
    self.contents = Bitmap.new(width - 32, height - 32)
    update
  end
def update
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.font.size = 16
    self.contents.draw_text(10,-210,640,480,"存档次数:") 
    self.contents.draw_text(40,-210,640,480,$game_system.save_count.to_s)
end
end
  
  
class Scene_Exit
  def main
    @spriteset = Spriteset_Map.new
    @command_window = Window_Exit.new
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @spriteset.dispose
  end
  def update
    100.times{Graphics.update}
  end  
  def exit_e
    $game_system.se_play($data_system.decision_se)
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    $scene = nil
  end  
end
 | 
 |