질문과 답변

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 21162
RMXP 셀프스위치 스크립트 조작법 4 석진이 2011.06.27 1425
RMVX 셀프스위치 관련해서... 2 호롤롤롤ㄹ 2014.05.03 669
RMVXA 셀프변수 스크립트 오류 5 file 바보인데 2017.07.15 147
이벤트 작성 RMMV 셀프 스위치와 일반 스위치의 차이는 무엇인가요? 1 마이메이 2022.07.24 150
이벤트 작성 RMMV 셀프 스위치를 사용하면 이벤트가 실행되지 않습니다 2 file 조각0 2023.08.05 97
RMVX 셀프 스위치는 반복(순환)해서 작동시킬 수 가 없는건가요? 4 빡새 2013.07.13 707
RMVXA 셀프 스위치 개수 늘리는 방법 없나요? 2 승비 2014.05.24 643
RMXP 셀프 변수 스크립트 오류질문입니다. 1 CJYG* 2013.07.02 1848
RMVXA 세트장비 착용 스크립트 1 로브남 2013.02.26 664
RMXP 세이프 창 표시좌표 관련 스크립트 간단한것 도와주세요 2 file 조석진 2013.05.10 971
RMVXA 세이브화면 수정 스크립트 사용 4 은호 2014.06.08 569
기타 RMMV 세이브한 후에 대사를 나오게하고싶어요(자세한건 사진을 참고) file 설연 2023.09.22 99
RMMV 세이브하고 다시 불러오기로 했을 때, 원래 있던 이벤트 말고 다른 방향으로 갈아타게 하고 싶습니다. 7 파란소리 2018.04.07 935
RMVXA 세이브파일을 하나만설정하는법 2 크리펄 2014.05.30 858
이벤트 작성 RMMV 세이브파일을 로드하여 불러왔을때마다 따로 생기는 분기는 어떻게 생성하나요? 2 일반적잉간 2019.03.15 182
RMXP 세이브파일1을 로드하기 3 humuri 2014.04.12 665
스크립트 작성 RMMV 세이브파일 불러오기, 옵션창 열기 스크립트는 어떻게 써야하나요? 1 뿔님 2021.01.31 282
RMVX 세이브파일 로드 오류(PC) 3 RPG세계 2015.02.02 670
RMVXA 세이브창 아이템창 크기 조절 못하나요 ㅠㅠ 2 EMSN 2015.01.19 366
RMVXA 세이브창 글씨 바꾸기 1 차동공 2015.02.09 212
Board Pagination Prev 1 ... 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 ... 518 Next
/ 518