Project1

标题: 冲突`` [打印本页]

作者: CortesDevil    时间: 2007-6-30 19:32
标题: 冲突``
脚本..1O78行发生ArigumentError.
comparison of Fixnum with nil failed


1078行以下我都弄出来了



  1.     now = now > max ? max : now
  2.     percentage = max != 0 ? (width-2) * now / max.to_f : 0
  3.     if start_color == end_color
  4.       self.contents.fill_rect(x+1, y+1, percentage, height-2, start_color)
  5.     else
  6.       for i in 1..percentage
  7.         r = start_color.red + (end_color.red - start_color.red) / percentage * i
  8.         g = start_color.green + (end_color.green - start_color.green) / percentage * i
  9.         b = start_color.blue + (end_color.blue - start_color.blue) / percentage * i
  10.         a = start_color.alpha + (end_color.alpha - start_color.alpha) / percentage * i
  11.         self.contents.fill_rect(x+i, y+1, 1, height-2, Color.new(r, g, b, a))
  12.       end
  13.     end
  14.   end
  15. end
复制代码

作者: CortesDevil    时间: 2007-6-30 19:32
标题: 冲突``
脚本..1O78行发生ArigumentError.
comparison of Fixnum with nil failed


1078行以下我都弄出来了



  1.     now = now > max ? max : now
  2.     percentage = max != 0 ? (width-2) * now / max.to_f : 0
  3.     if start_color == end_color
  4.       self.contents.fill_rect(x+1, y+1, percentage, height-2, start_color)
  5.     else
  6.       for i in 1..percentage
  7.         r = start_color.red + (end_color.red - start_color.red) / percentage * i
  8.         g = start_color.green + (end_color.green - start_color.green) / percentage * i
  9.         b = start_color.blue + (end_color.blue - start_color.blue) / percentage * i
  10.         a = start_color.alpha + (end_color.alpha - start_color.alpha) / percentage * i
  11.         self.contents.fill_rect(x+i, y+1, 1, height-2, Color.new(r, g, b, a))
  12.       end
  13.     end
  14.   end
  15. end
复制代码

作者: 精灵使者    时间: 2007-6-30 19:47
那个函数好像没有调用上……是否修改某些东西了?
作者: CortesDevil    时间: 2007-6-30 19:50
{/gg}木有修改吖
作者: CortesDevil    时间: 2007-6-30 20:08
自己弄好了{/fd}




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1