질문과 답변

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 21126
RMVXA 이벤트 액알 몬스터의 체력 11 file 떡좀쪄봐 2014.02.12 611
RMVX 온라인모드채팅창 꺼두는법좀 갈쳐주세요. file 담탱이 2011.02.18 611
RMVX 배경이 두장으로 보여요. 1 소미여우 2011.02.13 611
RMXP 제일 처음 시작했을때 스위치 켜는방법? 1 가나다라마바사아자 2010.12.31 611
RMXP 또 질문이여 3 hero 2010.12.28 611
RMVXA 장비 슬롯을 바꾸고 싶습니다 Rebiart 2014.05.17 610
RMVXA 창 페이드 효과를 없애는 방법이 있나요? aicarrot 2013.03.27 610
RMXP 능력치.. 1 포뇨포뇨포뇨 2011.01.14 610
RMVX 미니맵 표시 어떻게 하나요? 1 준짱돌이 2010.12.22 610
RMVX 스테이터스 커스텀 스크립트 관련 질문입니다. T.C.O.L 2010.10.31 610
RM2k3 rpg2003rtp일문판 제대로 된것 좀 answntjs00 2014.11.02 609
RMVXA 이벤트 질문입니다 1 코요미 2013.05.10 609
RMVX 전투기 또는 헬리콥터로 스크롤식(탑뷰 또는 사이드) 게임을 만드려는데요 1 FronT 2011.01.05 609
RMVX 로드관련 질문! 2 몽실년 2010.10.01 609
RMXP 윈도우창 위치 변경 5 file 모자리나 2018.06.09 609
RMVX 아이템을 선택했을 때만 작동하게 하는 방법 1 파프리카 2014.07.21 609
기본툴 사용법 RMMV Actor.json 을 읽을 수 없습니다 오류 3 겜만들고싶다앙 2020.11.09 608
RMVXA 게임 오버시 저장파일 삭제 7 Hamachi 2014.09.12 608
RMVX 이벤트 종료 어떻게 하죠 4 멸가 2014.05.25 608
RMVXA 이벤트 리젠 문제. 글쎄,왜 난 적용이 안될까? 2013.03.28 608
Board Pagination Prev 1 ... 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 ... 518 Next
/ 518