查看: 2346|回复: 1

[已经过期] 请教如何初始化脚本OTL

  [复制链接]
头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-5-29
回帖
4
发表于 2009-12-23 15:35:34 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
梦石
0
星屑
1580
在线时间
1564 小时
注册时间
2008-7-30
回帖
4207

贵宾

发表于 2009-12-23 22:41:44 | 显示全部楼层
额,LZ很厉害啊{:nm_3:} 类名首字母必须大写,否则会发生语法错误(SyntaxError)。
  1. $scene.main while $scene != nil
复制代码
而这句话的意思就是如果$scene不为空的话就执行main方法。你就起码要给MyMoudal添加一个main方法。

整个代码也就是这样:
  1. class MyMoudal
  2.   def main
  3.     $scene = Scene_Title.new
  4.   end
  5. end
复制代码
  1. begin
  2.   Graphics.freeze
  3.   $scene = MyMoudal.new
  4.   $scene.main while $scene != nil
  5.   Graphics.transition(30)
  6. rescue Errno::ENOENT
  7.   filename = $!.message.sub("No such file or directory - ", "")
  8.   print("Unable to find file #{filename}.")
  9. end
复制代码
之前水镜先生写了点RGSS2入门教程(由于他是高三学生,所以没写多少{:nm_7:})供你参考一下吧:
http://myyxs.5d6d.com/forum-82-1.html

See FScript Here:https://github.com/DeathKing/fscript
潜心编写URG3中。
所有对URG3的疑问和勘误或者建议,请移步至发布页面。
欢迎萌妹纸催更
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部