질문과 답변

Extra Form


module Omg_n213y2
  
  FileName = '말발굽3'
  Volume = 100
  Pitch = 100
  
  end

#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
#  This class handles the player. It includes event starting determinants and
# map scrolling functions. The instance of this class is referenced by
# $game_player.
#==============================================================================

class Game_Player < Game_Character
#--------------------------------------------------------------------------
  # * Increase Steps
  #--------------------------------------------------------------------------
  def increase_steps
    super
    
    @name = Omg_n213y2::FileName
    @volume = Omg_n213y2::Volume
    @pitch = Omg_n213y2::Pitch

  def play
      Audio.se_play('Audio/SE/' + @name, @volume, @pitch)
    end
  end
  def self.stop
    Audio.se_stop
  end
 

    $game_party.increase_steps
    if def normal_walk?
    @vehicle_type == :walk && !@move_route_forcing
    end
end

윽 오메가로이드님 동영상보고 vx ace를 통해 응용을 해보는데 자꾸 저런 경고 메세지가 뜨네요ㅠㅠ end를 지워도 안 되고...
제가 스크립트를 어제 처음 만져보는거라 거의 컴맹 수준이에요...ㅠㅠ
Comment '2'
  • ?
    일단 2014.10.07 23:37

    스크립트 구조가 제가 많이 봐왔던 구조가 아닌지라...
    이게 원래 다른 구조인데 작성자님께서 잘못 쓰신 건지,
    아니면 원래 이 구조로 되어있는 건지,
    그 부분부터가 애매하네요.

    결론부터 말씀드리면, end가 이상한 곳에 있으며, end가 부족하다, 뭐 이런 뜻이네요. 대략적으로요.

    #==============================================================================
    # ** Game_Player
    #------------------------------------------------------------------------------
    # This class handles the player. It includes event starting determinants and
    # map scrolling functions. The instance of this class is referenced by
    # $game_player.
    #==============================================================================

    class Game_Player < Game_Character

      #--------------------------------------------------------------------------
      # * Increase Steps
      #--------------------------------------------------------------------------
      def increase_steps
      super
        @name = Omg_n213y2::FileName
        @volume = Omg_n213y2::Volume
        @pitch = Omg_n213y2::Pitch
      end

      def play
        Audio.se_play('Audio/SE/' + @name, @volume, @pitch)
      end

      def self.stop
        Audio.se_stop
      end

      def ???
        $game_party.increase_steps
        if def normal_walk?
        @vehicle_type == :walk && !@move_route_forcing
      end

    end

    원래 스크립트가 이런 형태인 건 아닐까 싶습니다.
    위에 보시면 def ??? 부분이 있는데,
    ???에 알맞은 메소드 이름만 집어넣으면 되겠는데,
    그 알맞은 메소드 이름이 뭔지 전 모르겠습니다 ㅠ


    다시 보니까 def normal_walk? 라는 부분이 있는데, 

    그게 또 if 뒤에 있네요. 

    문법적으로 좀 뒤틀려있는데,

    이게 어떻게 수정되어야 바로 잡히는 건지.. 모르겠습니다;

  • profile
    ㅅㅇ 2014.10.08 22:38
    윽 감사합니다ㅠㅠ 제가 어설프게 응용해서 그래요... 제가 잘못 썼습니다
    다른 스크립트를 써서 일단 해결은 됐구ㅠㅠ 조언 감사합니다ㅠㅠㅠㅠㅠㅠㅠㅠ

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12456
Board Pagination Prev 1 ... 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 Next
/ 83