Project1
标题: 游戏读取存档时出现异常原因是调用未定义的方法 [打印本页]
作者: a1521120204 时间: 2017-6-13 12:40
标题: 游戏读取存档时出现异常原因是调用未定义的方法
本帖最后由 a1521120204 于 2017-6-13 13:02 编辑
module Kien::Appellation
APPE_INFO = Struct.new("Appe_Info", :param, :name, :description, :enable)
module_function
#--------------------------------------------------------------------------
def got_appe_param(actor_id, id)
param = []
APPELLATION[actor_id][id][0].split(/\|/).each{ |str|
case str
when Kien::Regexp::Appellation::STATUS
param.push [$1, $2.to_i, $3]
end
}
return param
end
#--------------------------------------------------------------------------
def construct_appe_data(actor_id)
appe = []
i = 0
APPELLATION[actor_id].each { |v|
info = APPE_INFO.new
info.param = got_appe_param(actor_id, i)
info.name = v[1]
info.description = v[2]
info.enable = (i == 0)
appe[i] = info
i += 1
}
return appe
end
end#
module Kien::Appellation
APPE_INFO = Struct.new("Appe_Info", :param, :name, :description, :enable)
module_function
#--------------------------------------------------------------------------
def got_appe_param(actor_id, id)
param = []
APPELLATION[actor_id][id][0].split(/\|/).each{ |str|
case str
when Kien::Regexp::Appellation::STATUS
param.push [$1, $2.to_i, $3]
end
}
return param
end
#--------------------------------------------------------------------------
def construct_appe_data(actor_id)
appe = []
i = 0
APPELLATION[actor_id].each { |v|
info = APPE_INFO.new
info.param = got_appe_param(actor_id, i)
info.name = v[1]
info.description = v[2]
info.enable = (i == 0)
appe[i] = info
i += 1
}
return appe
end
end#
module Kien::Appellation
APPE_INFO = Struct.new("Appe_Info", :param, :name, :description, :enable)
module_function
#--------------------------------------------------------------------------
def got_appe_param(actor_id, id)
param = []
APPELLATION[actor_id][id][0].split(/\|/).each{ |str|
case str
when Kien::Regexp::Appellation::STATUS
param.push [$1, $2.to_i, $3]
end
}
return param
end
#--------------------------------------------------------------------------
def construct_appe_data(actor_id)
appe = []
i = 0
APPELLATION[actor_id].each { |v|
info = APPE_INFO.new
info.param = got_appe_param(actor_id, i)
info.name = v[1]
info.description = v[2]
info.enable = (i == 0)
appe[i] = info
i += 1
}
return appe
end
end#
module Kien::Appellation
APPE_INFO = Struct.new("Appe_Info", :param, :name, :description, :enable)
module_function
#--------------------------------------------------------------------------
def got_appe_param(actor_id, id)
param = []
APPELLATION[actor_id][id][0].split(/\|/).each{ |str|
case str
when Kien::Regexp::Appellation::STATUS
param.push [$1, $2.to_i, $3]
end
}
return param
end
#--------------------------------------------------------------------------
def construct_appe_data(actor_id)
appe = []
i = 0
APPELLATION[actor_id].each { |v|
info = APPE_INFO.new
info.param = got_appe_param(actor_id, i)
info.name = v[1]
info.description = v[2]
info.enable = (i == 0)
appe[i] = info
i += 1
}
return appe
end
end#
如题,我在弄游戏的时候体验了还不错,然后由于失误死亡了....但是读取存档就报错[有图]
然后我新开游戏又没事....我找了找发现是因为脚本调用了未定义的方法而且是each报错,我估摸着 是因为那行代码不是数组??
我也是个半吊子的编程者而且那些代码啥的早忘了,希望各位编程dalao帮帮忙看一下
然后我就把整行脚本贴下来了
图片显示报错的312行那一行就是这个APPELLATION[actor_id].each { |v|
-
QQ截图20170613123430.png
(4.71 KB, 下载次数: 16)
作者: 上贺茂润 时间: 2017-6-13 17:42
本帖最后由 上贺茂润 于 2017-6-13 17:45 编辑
@黄鸡@怪蜀黍 @正太君
此人破解我游戏修改内容还来论坛宣扬,证据已经发到聪聪QQ上,请版主查封此人账号和ip
另外我会将此人的信息、姓名、家庭住址等内容公布在我下一个版本游戏里作为黑名单发布,让广大游戏玩家一睹此类乐色并“慰问”
包括此人QQ信息,我均会公布在玩家圈、QQ群和贴吧里,和谐游戏制作环境氛围从我做起
欢迎光临 Project1 (https://rpg.blue/) |
Powered by Discuz! X3.1 |