查看: 1303|回复: 2

真·对话加强脚本出错有人知道什么问题吗?

  [复制链接]
梦石
0
星屑
253
在线时间
574 小时
注册时间
2006-8-25
回帖
772
发表于 2007-8-21 18:53:10 | 显示全部楼层 |阅读模式

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

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

×
在头像显示中我加入了         if $1 == 1
           $1 = $data_actors[387].name
当$1等于1时
就$1变为387号人物的名字.但$1 = $data_actors[387].name这一段显示错误
还有就是"$"这个符号什么意思?在RPG帮助里找不到...

      #——头像设置
      if (/\\[Ff]\[(.+?)\]/.match(@now_text))!=nil then
         @face_file = $1 + ".png"
         @x = @face_indent = 128
         if $1 == 1
           $1 = $data_actors[387].name
        end
         if FileTest.exist?("Graphics/Pictures/" + $1 + ".png")
         self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 120, 120))
         end
        @now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" }
      end
梦石
0
星屑
253
在线时间
574 小时
注册时间
2006-8-25
回帖
772
发表于 2007-8-21 18:53:10 | 显示全部楼层 |阅读模式

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

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

×
在头像显示中我加入了         if $1 == 1
           $1 = $data_actors[387].name
当$1等于1时
就$1变为387号人物的名字.但$1 = $data_actors[387].name这一段显示错误
还有就是"$"这个符号什么意思?在RPG帮助里找不到...

      #——头像设置
      if (/\\[Ff]\[(.+?)\]/.match(@now_text))!=nil then
         @face_file = $1 + ".png"
         @x = @face_indent = 128
         if $1 == 1
           $1 = $data_actors[387].name
        end
         if FileTest.exist?("Graphics/Pictures/" + $1 + ".png")
         self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 120, 120))
         end
        @now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" }
      end

精灵族の天使<

梦石
0
星屑
1712
在线时间
3039 小时
注册时间
2007-3-16
回帖
33092

开拓者贵宾

发表于 2007-8-21 19:00:33 | 显示全部楼层
我建议把$后面的名字设为字符,最好开头大写。否则容易出错。
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部