Project1
标题: 关于存档的头数据…… [打印本页]
作者: 喵呜喵5 时间: 2014-2-13 14:30
标题: 关于存档的头数据……
本帖最后由 喵呜喵5 于 2014-2-13 14:58 编辑
修改DataManager中保存存档头数据的方法make_save_header,使用下面这种写法:
def make_save_header
header = {}
header[:characters] = $game_party.characters_for_savefile
header[:playtime_s] = $game_system.playtime_s
header[:chapter] = $game_variables[4]
header
end
def make_save_header
header = {}
header[:characters] = $game_party.characters_for_savefile
header[:playtime_s] = $game_system.playtime_s
header[:chapter] = $game_variables[4]
header
end
能够正常保存存档,但是使用下面这种写法:
alias m5_make_save_header make_save_header
def make_save_header
m5_make_save_header
header[:chapter] = $game_variables[4]
header
end
alias m5_make_save_header make_save_header
def make_save_header
m5_make_save_header
header[:chapter] = $game_variables[4]
header
end
却会报错,请问是为什么?
原方法:
def make_save_header
header = {}
header[:characters] = $game_party.characters_for_savefile
header[:playtime_s] = $game_system.playtime_s
header
end
def make_save_header
header = {}
header[:characters] = $game_party.characters_for_savefile
header[:playtime_s] = $game_system.playtime_s
header
end
作者: Sion 时间: 2014-2-13 14:57
header 未定义:- alias m5_make_save_header make_save_header
- def make_save_header
- h = m5_make_save_header
- h[:chapter] = $game_variables[4]
- h
- end
复制代码
欢迎光临 Project1 (https://rpg.blue/) |
Powered by Discuz! X3.1 |