设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1491|回复: 2
打印 上一主题 下一主题

[已经过期] 脚本出现syntaxError错误

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
47 小时
注册时间
2016-8-12
帖子
29
跳转到指定楼层
1
发表于 2016-9-5 20:56:49 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
从别人家弄了个脚本结果怎么都是这样的错误 该怎么办


RUBY 代码复制
  1. class Scene_Staff
  2.  
  3. def initialize(return_scene = nil)
  4.     @sprite = Sprite.new
  5.     @sprite.bitmap = Bitmap.new("Graphics/Panoramas/007-Ocean01")
  6.     @sprite.x = 0
  7.     @sprite.y = 0
  8.     if return_scene.nil?
  9.       return_scene = Scene_Title.new
  10.     end
  11.     @return_scene = return_scene
  12.   end
  13.  
  14.   def scene_start
  15.     credit_lines = CREDIT.split(/\n/)
  16.     credit_bitmap = Bitmap.new(640,32 * credit_lines.size)
  17.     credit_lines.each_index do |i|
  18.       line = credit_lines[i]
  19.       credit_bitmap.draw_text(0,i * 32,640,32,line,1)
  20.     end
  21.     @credit_sprite = Sprite.new(Viewport.new(0,50,640,380))
  22.     @credit_sprite.bitmap = credit_bitmap
  23.     @credit_sprite.oy = -430
  24.     @frame_index = 0
  25.     @last_flag = false
  26.   end
  27.  
  28.   def scene_end
  29.     @credit_sprite.dispose
  30.     @sprite.dispose
  31.   end
  32.  
  33.   def last?
  34.     return (@frame_index >= @credit_sprite.bitmap.height + 480)
  35.   end
  36.  
  37.   def last
  38.     if not @last_flag
  39.       Audio.bgm_fade(10000)
  40.       @last_flag = true
  41.       @last_count = 0
  42.     else
  43.       @last_count += 1
  44.     end
  45.     if @last_count >= 300
  46.       $scene = @return_scene
  47.     end
  48.   end
  49.  
  50.   def update
  51.     @frame_index += 1
  52.     return if cancel?
  53.     last if last?
  54.     @credit_sprite.oy += 1
  55.   end
  56.  
  57.   def cancel?
  58.     if Input.trigger?(Input::B)
  59.       $scene = @return_scene
  60.       return true
  61.     end
  62.     return false
  63.   end
  64.  
  65.   def main
  66.     scene_start
  67.     # 过渡
  68.     Graphics.transition
  69.     # 主循环
  70.     loop do
  71.       Graphics.update
  72.       Input.update
  73.       update
  74.       if $scene != self
  75.         break
  76.       end
  77.     end
  78.     # 准备过渡
  79.     Graphics.freeze
  80.     scene_end
  81.   end
  82. end

Lv3.寻梦者

梦石
0
星屑
1358
在线时间
1295 小时
注册时间
2012-8-4
帖子
749
2
发表于 2016-9-5 23:05:46 | 只看该作者
没有分裂的内容

点评

谢谢  发表于 2016-9-6 20:57
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-22 06:59

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表