질문과 답변

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 12451
RMXP 게임 엔딩 이후 내용전개를 하려고 하는데, or반때 2016.04.10 165
RMXP 게임 실행 자체가 안되는데.. 아스가방 2017.10.13 82
RMXP 게임 시작 하면 캐릭이 안움직여져요 2 후야여 2011.10.03 1870
RMXP 게임 스타트시 맵 읽기 실패 오류에 대한 질문... 2 file 칸슐츠 2013.12.13 928
에러 해결 RMXP 게임 소리가 아예 안나요 2 호이호이 2019.06.15 145
기타 RMXP 게임 세이브를 할때 덮어쓰기 경고를 만들고 싶습니다. really0 2023.05.17 30
스크립트 작성 RMXP 게임 새로하기를 눌렀을 때 이미지를 띄우고 싶습니다 새싹입니다 2020.07.28 81
RMXP 게임 밸런스맞출때 질문좀요~ 2 Amaster 2011.12.13 1832
RMXP 게임 배포하는데 여러가지가 부족해요 ㅠㅠ 7 알피지최고 2012.06.12 1561
RMXP 게임 밖 윈도우로 메세지 표시?? 하는법에 대해서 아시는분 있을까요? 3 팥떡 2013.12.29 921
RMXP 게임 만들때 필요한 도트는 어떻게 구하나요?(혹시 만드는 법이라도 있나요?) rkdalswjd12 2018.07.01 70
RMXP 게임 만들때 필요한 도트는 어떻게 구하나요?(혹시 만드는 법이라도 있나요?) rkdalswjd12 2018.07.01 122
RMXP 게임 만드는 설명 1 gnsalswjddma119 2011.11.22 1798
RMXP 게임 동시제작 2 꼽등이 2011.01.19 607
RMXP 게임 데이터의 작성 오류 2 왕초메이커 2011.03.02 774
RMXP 게임 데이터 작성(암호화 프로젝트)를 했는데 문제가 발생했습니다. 현문 2010.10.29 1230
RMXP 게임 다 만들고 배포하려면 무슨 파일필요하죠? 3 가나다라마바사아자 2011.01.04 457
RMXP 게임 기본 메뉴에서 커서 이동 관련 2 THE풀잎 2014.10.30 365
RMXP 게이지바와 미니맵 스크립트를 같이 사용하니까 미니맵이 멈춰요. ssbest1015 2011.04.28 785
RMXP 게이지바를만들었는데요...... 1 베드보이닉쿤 2011.01.10 618
Board Pagination Prev 1 ... 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 ... 90 Next
/ 90