질문과 답변

Extra Form

저장하면튕기고 저장한거 불러와도 튕깁니다 ㅠㅠ 이거왜이러죠??

 

스크립트오류같은데 세이브 스크립트 좀 복붙해주실분없나요?? ㅠㅠ

Comment '2'
  • ?
    Alkaid 2013.08.08 12:34
    우선 어떤 스크립트를 사용하는지 알려주셔야 합니다.
  • ?
    빵테의비밀 2013.08.08 12:49
    세이브는
    ==============================================================================
    # ■ Scene_Save
    #------------------------------------------------------------------------------
    #  세이브 화면의 처리를 실시하는 클래스입니다.
    #==============================================================================

    class Scene_Save < Scene_File
    #--------------------------------------------------------------------------
    # ● 오브젝트 초기화
    #--------------------------------------------------------------------------
    def initialize
    super("어느 파일에 세이브합니까?")
    end
    #--------------------------------------------------------------------------
    # ● 결정시의 처리
    #--------------------------------------------------------------------------
    def on_decision(filename)
    # 세이브 SE 를 연주
    $game_system.se_play($data_system.save_se)
    # 세이브 데이터의 기입
    file = File.open(filename, "wb")
    write_save_data(file)
    file.close
    # 이벤트로부터 불려 가고 있는 경우
    if $game_temp.save_calling
    # 세이브 호출 플래그를 클리어
    $game_temp.save_calling = false
    # 맵 화면으로 전환해
    $scene = Scene_Map.new
    return
    end
    # 메뉴 화면으로 전환해
    $scene = Scene_Menu.new(4)
    end
    #--------------------------------------------------------------------------
    # ● 캔슬시의 처리
    #--------------------------------------------------------------------------
    def on_cancel
    # 캔슬 SE 를 연주
    $game_system.se_play($data_system.cancel_se)
    # 이벤트로부터 불려 가고 있는 경우
    if $game_temp.save_calling
    # 세이브 호출 플래그를 클리어
    $game_temp.save_calling = false
    # 맵 화면으로 전환해
    $scene = Scene_Map.new
    return
    end
    # 메뉴 화면으로 전환해
    $scene = Scene_Menu.new(4)
    end
    #--------------------------------------------------------------------------
    # ● 세이브 데이터의 기입
    # file : 기입용 파일 오브젝트 (오픈이 끝난 상태)
    #--------------------------------------------------------------------------
    def write_save_data(file)
    # 세이브 파일 묘화용의 캐릭터 데이터를 작성
    characters = []
    for i in 0...$game_party.actors.size
    actor = $game_party.actors[i]
    characters.push([actor.character_name, actor.character_hue])
    end
    # 세이브 파일 묘화용의 캐릭터 데이터를 쓴다
    Marshal.dump(characters, file)
    # 플레이 시간 계측용의 프레임 카운트를 쓴다
    Marshal.dump(Graphics.frame_count, file)
    # 세이브 회수를 1 늘린다
    $game_system.save_count += 1
    # magic number-를 보존한다
    # (에디터로 보존할 때마다 랜덤인 값에 고쳐 쓸 수 있다)
    $game_system.magic_number = $data_system.magic_number
    # 각종 게임 오브젝트를 쓴다
    Marshal.dump($game_system, file)
    Marshal.dump($game_switches, file)
    Marshal.dump($game_variables, file)
    Marshal.dump($game_self_switches, file)
    Marshal.dump($game_screen, file)
    Marshal.dump($game_actors, file)
    Marshal.dump($game_party, file)
    Marshal.dump($game_troop, file)
    Marshal.dump($game_map, file)
    Marshal.dump($game_player, file)
    end
    end
    구요 로드는
    #==============================================================================
    # ■ Scene_Load
    #------------------------------------------------------------------------------
    #  로드 화면의 처리를 실시하는 클래스입니다.
    #==============================================================================

    class Scene_Load < Scene_File
    #--------------------------------------------------------------------------
    # ● 오브젝트 초기화
    #--------------------------------------------------------------------------
    def initialize
    # 텐포라리오브제크트를 재작성
    $game_temp = Game_Temp.new
    # 타임 스탬프가 최신의 파일을 선택
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..3
    filename = make_filename(i)
    if FileTest.exist?(filename)
    file = File.open(filename, "r")
    if file.mtime > latest_time
    latest_time = file.mtime
    $game_temp.last_file_index = i
    end
    file.close
    end
    end
    super("어느 파일을 로드합니까?")
    end
    #--------------------------------------------------------------------------
    # ● 결정시의 처리
    #--------------------------------------------------------------------------
    def on_decision(filename)
    # 파일이 존재하지 않는 경우
    unless FileTest.exist?(filename)
    # 버저 SE 를 연주
    $game_system.se_play($data_system.buzzer_se)
    return
    end
    # 로드 SE 를 연주
    $game_system.se_play($data_system.load_se)
    # 세이브 데이터의 기입
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    # BGM, BGS 를 복귀
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    # 맵을 갱신 (병렬 이벤트 실행)
    $game_map.update
    # 맵 화면으로 전환해
    $scene = Scene_Map.new
    end
    #--------------------------------------------------------------------------
    # ● 캔슬시의 처리
    #--------------------------------------------------------------------------
    def on_cancel
    # 캔슬 SE 를 연주
    $game_system.se_play($data_system.cancel_se)
    # 타이틀 화면으로 전환해
    $scene = Scene_Title.new
    end
    #--------------------------------------------------------------------------
    # ● 세이브 데이터의 읽기
    # file : 읽기용 파일 오브젝트 (오픈이 끝난 상태)
    #--------------------------------------------------------------------------
    def read_save_data(file)
    # 세이브 파일 묘화용의 캐릭터 데이터를 읽어들인다
    characters = Marshal.load(file)
    # 플레이 시간 계측용의 프레임 카운트를 읽어들인다
    Graphics.frame_count = Marshal.load(file)
    # 각종 게임 오브젝트를 읽어들인다
    $game_system = Marshal.load(file)
    $game_switches = Marshal.load(file)
    $game_variables = Marshal.load(file)
    $game_self_switches = Marshal.load(file)
    $game_screen = Marshal.load(file)
    $game_actors = Marshal.load(file)
    $game_party = Marshal.load(file)
    $game_troop = Marshal.load(file)
    $game_map = Marshal.load(file)
    $game_player = Marshal.load(file)
    # magic number-가 세이브시와 다른 경우
    # (에디터로 편집이 더해지고 있는 경우)
    if $game_system.magic_number != $data_system.magic_number
    # 맵을 리로드
    $game_map.setup($game_map.map_id)
    $game_player.center($game_player.x, $game_player.y)
    end
    # 파티 멤버를 리프레쉬
    $game_party.refresh
    end
    end
    입니다 세이브 로드 둘다안되요 ㅠㅠ 다른 모든 게임들도안되는데 이건 프로그램에문제인가요?

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12398
RMVX 로드관련 질문! 2 몽실년 2010.10.01 597
RMVX VX 아이템 색 변경 스크립트 적용시 색이 흐리게 나옵니다. 2 file 빡새 2014.05.05 596
RMVX ziifee's Wait Gauge Battle 사용시 궁금점 피망군 2013.05.02 596
RMXP 문장이 나오면서 캐릭터들이 각각 움직이기. 2 윤상송송 2011.02.18 596
RMVX 게임의 색조변경, 게임 내 아이템 장착과 사용에 관한 질문(꼭 답해주세요!!!) 1 비공개아이디 2011.01.08 596
RMVX 아이템을 선택했을 때만 작동하게 하는 방법 1 파프리카 2014.07.21 596
RMVXA [신입의 질문]이거 어떻게 해결하나요??(질문개수 2개) 2 file 만다라케 2015.04.16 595
RMXP 캐릭터 프레임 수 증가 플롭 2014.06.02 595
RMVXA 동영상 인코딩문제 1 파닥이 2014.01.23 595
RMVXA 그림(픽쳐) 우선순위 어떻게 바꾸나요? 접속스킬 2013.07.21 595
RMXP 상,하로 움직였을 때 체력 게이지바가 줄지않아요 2 file 요야 2014.02.26 594
RMXP 세이브 오류 2 빵테의비밀 2013.08.08 594
RMVX 이름입력스크립트는 어떻게 사용하나요? 1 물레방아 2013.05.24 594
RMVX 움직이는 타이틀 배경을 사용하고 싶은데 방법을 모르겠습니다. 2 슈트롱 2014.11.03 594
RMXP 스크립트 명령어에서 2 담먹캐 2011.02.16 594
RMXP 저장할려는데자꾸팅겨요ㄷㄷ ★☆★빤짝이☆★☆ 2010.11.18 594
RMVXA 게임 오버시 저장파일 삭제 7 Hamachi 2014.09.12 593
RMVXA 게임 이어할적의 이벤트 활성화 문제 .. 2 file 오렌지캬라멜 2014.01.23 593
RMVX 그래픽 파일 앞에 붙이는 수식어에 대한 차이 1 appletree 2013.02.01 593
RMVX 사용하는 갑옷에 따른 보행그래픽 변경 4 LLTL 2013.01.19 593
Board Pagination Prev 1 ... 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 ... 516 Next
/ 516