求助
rpgmaker吧
全部回复
仅看楼主
level 1
蓝天233- 楼主
肿么回事
脚本“Window_NameInput”的第71行发生了 TypeError。cannot convert nil into String
2014年01月05日 06点01分 1
level 1
蓝天233- 楼主
]
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 128, 640, 352)
self.contents = Bitmap.new(width - 32, height - 32)
@index = 0
refresh
update_cursor_rect
end
#--------------------------------------------------------------------------
# ● 获取文字
#--------------------------------------------------------------------------
def character
return CHARACTER_TABLE[@index]
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0..179
x = 4 + i / 5 / 9 * 152 + i % 5 * 28
y = i / 5 % 9 * 32
self.contents.draw_text(x, y, 28, 32, CHARACTER_TABLE[i], 1)
end
self.contents.draw_text(544, 9 * 32, 64, 32, "确定", 1)
end
#--------------------------------------------------------------------------
# ● 刷新光标矩形
#--------------------------------------------------------------------------
def update_cursor_rect
# 光标位置在 [确定] 的情况下
if @index >= 180
self.cursor_rect.set(544, 9 * 32, 64, 32)
# 光标位置在 [确定] 以外的情况下
else
x = 4 + @index / 5 / 9 * 152 + @index % 5 * 28
y = @index / 5 % 9 * 32
self.cursor_rect.set(x, y, 28, 32)
end
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
# 光标位置在 [确定] 的情况下
if @index >= 180
# 光标下
if Input.trigger?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
@index -= 180
end
2014年01月05日 06点01分 2
level 1
蓝天233- 楼主
46~100脚本
2014年01月05日 06点01分 3
1