Project1
标题:
还是状态窗口的问题。。。
[打印本页]
作者:
zphyp120
时间:
2011-8-3 18:43
标题:
还是状态窗口的问题。。。
自从刚刚发帖改了一下以后,第一次测试时可以使用,到第二次测试时就显示“testname = @actor.id.to_s + "_b"发”生了SyntaxError也就是未知的语法错误,求解释
dsu_plus_rewardpost_czw
作者:
IamI
时间:
2011-8-3 18:48
SyntaxError的发生行一般都在那行以上。查哪里少END吧
作者:
zphyp120
时间:
2011-8-3 18:57
本帖最后由 zphyp120 于 2011-8-3 19:03 编辑
IamI 发表于 2011-8-3 18:48
SyntaxError的发生行一般都在那行以上。查哪里少END吧
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
# actor : 角色
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
case @actor.id
when 1
self.contents.draw_text(20, 260, 216, 175, "1号角色的说明")
when 2
self.contents.draw_text(20, 260, 216, 32, "骑士“王之守护”中的一位,能力最强)
end
testname = @actor.id.to_s + "_b"
bitmap=Bitmap.new("Graphics/pictures/#{testname}")
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(0, 0, bitmap, src_rect)
draw_actor_name(@actor, 260, 0)
draw_actor_class(@actor, 360, 32)
draw_actor_level(@actor, 260, 32)
draw_actor_state(@actor, 380, 0)
draw_actor_hp(@actor, 260, 64, 172)
draw_actor_sp(@actor, 260, 96, 172)
draw_actor_parameter(@actor, 440, 66, 0)
draw_actor_parameter(@actor, 440, 96, 1)
draw_actor_parameter(@actor, 440, 130, 2)
draw_actor_parameter(@actor, 260, 162, 3)
draw_actor_parameter(@actor, 260, 194, 4)
draw_actor_parameter(@actor, 440, 162, 5)
draw_actor_parameter(@actor, 440, 194, 6)
self.contents.font.color = Color.new(255,255,0,255)
self.contents.draw_text(259, 399, 80, 32, "EXP")
self.contents.draw_text(439, 399, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(260 + 80, 400, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(440 + 80, 400, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = Color.new(255,255,0,255)
self.contents.draw_text(260, 240, 96, 32, "装备")
draw_item_name($data_weapons[@actor.weapon_id], 260, 270)
draw_item_name($data_armors[@actor.armor1_id], 420, 270)
draw_item_name($data_armors[@actor.armor2_id], 260, 310)
draw_item_name($data_armors[@actor.armor3_id], 420, 310)
draw_item_name($data_armors[@actor.armor4_id], 260, 350)
end
end
复制代码
作者:
凌冰
时间:
2011-8-4 09:33
zphyp120 发表于 2011-8-3 18:57
囧= =我看了半天才看出来,这个太囧了,第二个人物的描述少了一个引号
作者:
无心孤云
时间:
2011-8-4 10:47
self.contents.draw_text(20, 260, 216, 32, "骑士“王之守护”中的一位,能力最强)
凌冰前辈无比强大- -
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1