Detailed Call Script Error Mesage

by Man... posted Oct 28, 2008
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
Screenshot

스크립트는 여기부터 시작합니다.
#==============================================================================
# ** [ERZVX] Detailled Call Script Error Message (13. April 2008 01:14)
#------------------------------------------------------------------------------
#  Shows some details about error in call script and don't exit game.
#==============================================================================

class Game_Interpreter
  #--------------------------------------------------------------------------
  # * Script
  #--------------------------------------------------------------------------
  def command_355
    script = @list[@index].parameters[0] + "n"
    loop {
      if @list[@index+1].code == 655        # Second line of script and after
        script += @list[@index+1].parameters[0] + "n"
      else
        break
      end
      @index += 1
    }
    begin
      eval(script)
    rescue Exception
      msg  = "Error Type:n#{$!.class}nn"
      msg += "Map ID:n#{@map_id}nn"
      msg += "Event ID:n#{@event_id}nn"
      line = $!.message[7, 1].to_i
      msg += "Error's line number:n#{line}nn"
      lines = script.split(/n/)
      msg += "Error's line:n#{lines[(line - 1)]}nn"
      msg += "Whole script:n#{script}"
      print(msg)
    end
    return true
  end
end