| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2026-2-3 |
| 在线时间 | 22 小时 |
- 梦石
- 0
- 星屑
- 95
- 在线时间
- 22 小时
- 注册时间
- 2013-8-15
- 回帖
- 0
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 a1521120204 于 2017-6-13 13:02 编辑
[pre lang=""]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 = info
i += 1
}
return appe
end
end#[/pre][pre lang="index"]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 = info
i += 1
}
return appe
end
end#[/pre]如题,我在弄游戏的时候体验了还不错,然后由于失误死亡了....但是读取存档就报错[有图]
然后我新开游戏又没事....我找了找发现是因为脚本调用了未定义的方法而且是each报错,我估摸着 是因为那行代码不是数组??
我也是个半吊子的编程者而且那些代码啥的早忘了,希望各位编程dalao帮帮忙看一下
然后我就把整行脚本贴下来了
图片显示报错的312行那一行就是这个APPELLATION[actor_id].each { |v| |
-
|