RPGXP rpgxp 스크립트 에러 질문
2008.02.16 17:35
#==============================================================================
# ■ Window_EquipLeft
#------------------------------------------------------------------------------
# 장비 화면에서, 액터의 파라미터 변화를 표시하는 윈도우입니다.
#==============================================================================
class Window_EquipLeft < Window_Base
#--------------------------------------------------------------------------
# ● 오브젝트 초기화
# actor : 액터
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 64, 272, 192)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● 리프레쉬
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_level(@actor, 4, 28)
draw_actor_parameter(@actor, 4, 56, 0)
draw_actor_parameter(@actor, 4, 80, 1)
draw_actor_parameter(@actor, 4, 104, 2)
draw_actor_parameter(@actor, 4, 128, 3)
draw_actor_parameter(@actor, 4, 152, 4)
draw_actor_parameter(@actor, 4, 176, 5)
draw_actor_parameter(@actor, 4, 200, 6)
if @new_atk != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 56, 40, 32, "→", 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, 56, 36, 32, @new_atk.to_s, 2)
end
if @new_pdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 80, 40, 32, "→", 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, 80, 36, 32, @new_pdef.to_s, 2)
end
if @new_mdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 104, 40, 32, "→", 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, 104, 36, 32, @new_mdef.to_s, 2)
end
if @new_str != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 128, 40, 32, "→", 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, 128, 36, 32, @new_str.to_s, 2)
if @new_dex != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 152, 40, 32, "→", 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, 152, 36, 32, @new_dex.to_s, 2)
if @new_agi != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 176, 40, 32, "→", 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, 176, 36, 32, @new_agi.to_s, 2)
if @new_int != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 200, 40, 32, "→", 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, 200, 36, 32, @new_int.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ● 장비 변경 후의 파라미터 설정
# new_atk : 장비 변경 후의 공격력
# new_pdef : 장비 변경 후의 물리 방어
# new_mdef : 장비 변경 후의 마법 방어
#--------------------------------------------------------------------------
def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int ← ↑이건 원래 한줄임
@new_atk = new_atk
@new_pdef = new_pdef
@new_mdef = new_mdef
@new_str = new_str
@new_dex = new_dex
@new_agi = new_agi
@new_int = new_int
refresh
end
end
end ← 90
일반 Window_Equipleft
에 해당하는 부분인데요.
저기 90에 해당하는 부분에서
Syntax Error 가 난다고 하네요..
스크립트 잘 아시는분들 어떻게 해야하는지 답변좀 부탁드립니다.
댓글 3
-
DJMAX
2008.02.21 06:46
-
엔젤레기온
2008.02.21 08:22
아, 근데 디제이맥스님의 스크립트를 다시 자세히 보니깐요.
if구문에서 마지막에 end가 생략된 곳이 몇군데 있네요.
제가 알기로는 if구문 마지막에 반드시 end를 해줘야 하는걸로 아는데
혹시 이건 잘못된것이 아닌지 의아해서 적어보겠습니다 ^^;|+rp2+|5095|+rp3+|qna -
DJMAX
2008.02.21 16:32
그거 고치니까 더이상 오류가 안뜨더군요!
캄사캄사!|+rp2+|5097|+rp3+|qna
에러가 났네요.
end를 추가하면 추가한줄에서 에러가
빼면 그 전줄에서 에러가 납니다. 글에 [숫자]이게 답변인줄 알고 아무도 답변 안한줄알았는데
코멘트수였군요..|+rp2+|5094|+rp3+|qna