本帖最后由 VIPArcher 于 2015-5-7 22:08 编辑
雷影 发表于 2015-5-7 21:53
报错是这个!
加上上面哪个代码也是一样
默认脚本中$game_system先于$game_variables之前生成,这个时候变量还没有初始化,然而这里你不要这样做就可以了
解决方法:去掉你脚本里的各种 variable_show_text3 # Renk
绘制那里改成
#-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh contents.clear renk = @variable_show_text3 = case $game_variables[60] when 0..49 then 'F' when 50..99 then 'E' when 100..149 then 'D' #...... else 'SSS' end draw_text(0, line_height * 0, contents.width, line_height, $game_variables[Freya::WindowVariableID],2)#显示佣兵积分的变量 contents.font.size = 16 draw_text(0, line_height * 1, contents.width, line_height, $game_system.variable_show_text)#显示佣兵积分字样 draw_text(0, line_height * 2, contents.width, line_height, renk) #显示佣兵等级字样 draw_text(0, line_height * 3, contents.width, line_height, $game_system.variable_show_text3,2) #显示Renk #上面的文字重叠了怎么改 才行? contents.font.size = Font.default_size end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
contents.clear
renk = @variable_show_text3 = case $game_variables[60]
when 0..49 then 'F'
when 50..99 then 'E'
when 100..149 then 'D'
#......
else 'SSS'
end
draw_text(0, line_height * 0, contents.width, line_height, $game_variables[Freya::WindowVariableID],2)#显示佣兵积分的变量
contents.font.size = 16
draw_text(0, line_height * 1, contents.width, line_height, $game_system.variable_show_text)#显示佣兵积分字样
draw_text(0, line_height * 2, contents.width, line_height, renk) #显示佣兵等级字样
draw_text(0, line_height * 3, contents.width, line_height, $game_system.variable_show_text3,2) #显示Renk
#上面的文字重叠了怎么改 才行?
contents.font.size = Font.default_size
end
未测试 |