질문과 답변

Extra Form

SRPG 스크립트를 사용 중 입니다.

다른 부분은 전혀 문제가 없는데, 어째선지 도주에 실패하면 에러가 납니다.


Script' Sprite_Turn_Character' line 45: TypeError occurred.

no implicit conversion from nil to integer


라고 뜨는데 어디가 잘못되었는지 전혀 모르겠습니다. 혹시 다른 스크립트 때문일까요?


  #--------------------------------------------------------------------------

  # ● オブジェクト初期化

  #     viewport : ビューポート

  #--------------------------------------------------------------------------

  def initialize(viewport, unit_index, i)

    super(viewport)

    @position = 0

    @duration = 0

    @unit_index = unit_index

▶여기가 45번줄     @actor = $game_temp.unit_data[@unit_index]

    @character_name = @actor.character_name

    @character_index = @actor.character_index

    # 敵味方の色分け

    @back_character = Sprite.new

    if @unit_index <= $game_party.members.size

      @back_character.bitmap = Cache.picture("frame_blue")

    else

      @back_character.bitmap = Cache.picture("frame_red")

    end

    @back_character.src_rect.set(0, 0, @back_character.bitmap.width, @back_character.bitmap.height)

    # グラフィックの描画

    sign = @character_name[/^[\!\$]./]

    if sign && sign.include?('$')

      self.bitmap = Cache.character(big_monster_ext)

      cw = bitmap.width

      ch = bitmap.height

      self.src_rect.set(0, 0, cw, ch)

    else

      self.bitmap = Cache.character(@character_name)

      cw = bitmap.width / 12

      ch = bitmap.height / 8 <= 28 ? bitmap.height / 8 : 28

      n = @character_index

      self.src_rect.set((n%4*3+1)*cw, (n/4*4)*(bitmap.height / 8), cw, ch)

    end

    self.z = 340 - (i - 7)

    @back_character.z = 341 - (i - 7)

    i = 7 if i > 7

    self.x = 482 + 24 - cw / 2

    @back_character.x = 482

    self.y = 18 + i * 32

    @back_character.y = 16 + i * 32

    update

  end

TAG •

계속 검색
List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12392
기타 RMVXA vx ace) (급합니다....부디 도움을...) 알만툴 내 기본 설정 관련 질문 2 게임이만들고파 2021.01.25 113
RMVXA ●SRPGコンバータ스크립트 도주실패시 오류 님믹 2014.11.23 309
계속 검색
Board Pagination Prev 1 Next
/ 1