질문과 답변

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 12457
스크립트 작성 RMMV 세이브를 누르면 특정 스위치를 끈 상태로 저장하는법 5 알만툴탐구 2023.03.20 95
RMVX 세이브를 금지 시키려고 하는데요... ㅠ 9 고무고무열매 2013.01.24 698
RMVX 세이브.. 1 프라임헌터즈 2011.01.01 504
RMXP 세이브,로드 기능 질문 드릴게요 4 file 낙원의공허 2013.04.28 1312
RMVXA 세이브 화면시 캐릭터얼굴 질문 2 file 파랑빛 2017.04.17 224
플러그인 추천 RMMV 세이브 화면 바꾸기 도와주세요 chiithecat 2020.09.08 176
RMVXA 세이브 파일 연동해서 창고기능을 만들 수 있나요? 4 SKT스피릿 2015.05.26 218
RMVX 세이브 파일 삭제.... 2 라유 2011.01.01 1349
RMVXA 세이브 파일 갯수 설정 2 작삼 2014.07.24 878
기타 세이브 튕김 현상 1 file 제주도삼다수찡! 2014.07.02 789
RMVX 세이브 크리스탈을 만들려고합니다 2 kallat 2011.08.18 1302
RMVXA 세이브 창과 아이템창을 투명화시키고, 크기도 바꿨으면 좋겠습니다. 1 EMSN 2015.01.16 215
RMMV 세이브 전부 삭제하는 명령어, 아이템 전부 삭제하는 명령어 1 잠행인 2017.10.11 158
RMXP 세이브 오류가납니다. 5 빵테의비밀 2013.08.10 1613
RMXP 세이브 오류 2 빵테의비밀 2013.08.08 594
스크립트 사용 RMVXA 세이브 슬롯 수 줄이는 방법 2 할짓없는인간 2021.05.05 77
RMXP 세이브 스크립트 오류 9 file 제프 2014.05.22 887
RMMV 세이브 삭제하는 플러그인 없나요? 2 해킹당한해커 2018.06.30 149
이벤트 작성 RMMV 세이브 삭제하는 법 알려주실 수 있으시나요? 2 지탁 2020.03.26 154
기타 세이브 목록 텍스트 수정 질문입니다. 2 file 잠만보기 2016.12.31 131
Board Pagination Prev 1 ... 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 ... 516 Next
/ 516