赞 | 1 |
VIP | 2 |
好人卡 | 3 |
积分 | 1 |
经验 | 3670 |
最后登录 | 2012-9-3 |
在线时间 | 151 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 151 小时
- 注册时间
- 2012-3-17
- 帖子
- 493
|
本帖最后由 skyjjwan 于 2012-4-1 09:18 编辑
找到问题所在了 = = 原来是跟路标提示有冲突 但是应该怎么解决啊?
刚进游戏的时候没有事 但是游戏一会再存就提示错误
错误行附近是装备属性随机脚本 读取档位置 读档和存档是两个错误的话 如图好了
这个是错误行附近的代码 存档错误是1254 读取错误是1276
1276那句是 $game_player = Marshal.load(file) 1254是 Marshal.dump($game_player, file)
- #==============================================================================
- # ■ Scene_File
- #==============================================================================
- class Scene_File < Scene_Base
- #--------------------------------------------------------------------------
- # ● 写入存档数据
- # file : 写入文件用对象 (已经打开)
- #--------------------------------------------------------------------------
- def write_save_data(file)
- characters = []
- for actor in $game_party.members
- characters.push([actor.character_name, actor.character_index])
- end
- $game_system.save_count += 1
- $game_system.version_id = $data_system.version_id
- @last_bgm = RPG::BGM::last
- @last_bgs = RPG::BGS::last
- Marshal.dump(characters, file)
- Marshal.dump(Graphics.frame_count, file)
- Marshal.dump(@last_bgm, file)
- Marshal.dump(@last_bgs, file)
- Marshal.dump($game_system, file)
- Marshal.dump($game_message, file)
- Marshal.dump($game_switches, file)
- Marshal.dump($game_variables, file)
- Marshal.dump($game_self_switches, 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)
- Marshal.dump($data_weapons, file)
- Marshal.dump($data_armors, file)
- end
- #--------------------------------------------------------------------------
- # ● 读取存档数据
- # file : 读取文件用对象 (已经打开)
- #--------------------------------------------------------------------------
- def read_save_data(file)
- characters = Marshal.load(file)
- Graphics.frame_count = Marshal.load(file)
- @last_bgm = Marshal.load(file)
- @last_bgs = Marshal.load(file)
- $game_system = Marshal.load(file)
- $game_message = Marshal.load(file)
- $game_switches = Marshal.load(file)
- $game_variables = Marshal.load(file)
- $game_self_switches = 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)
- $data_weapons = Marshal.load(file)
- $data_armors = Marshal.load(file)
- if $game_system.version_id != $data_system.version_id
- $game_map.setup($game_map.map_id)
- $game_player.center($game_player.x, $game_player.y)
- end
- end
- end
复制代码 请帮我看看吧 |
|