本帖最后由 张咚咚 于 2017-8-25 10:05 编辑
#获取全部物品 for i in 1..$data_items.length - 1 item = $data_items[i] next if item.name.empty? $game_party.gain_item(item, 99) end
#获取全部物品
for i in 1..$data_items.length - 1
item = $data_items[i]
next if item.name.empty?
$game_party.gain_item(item, 99)
end
#获取全部武器 for i in 1..$data_weapons.length - 1 weapon = $data_weapons[i] next if weapon.name.empty? $game_party.gain_item(weapon, 1) end
#获取全部武器
for i in 1..$data_weapons.length - 1
weapon = $data_weapons[i]
next if weapon.name.empty?
$game_party.gain_item(weapon, 1)
end
#获取全部防具 for i in 1..$data_armors.length - 1 armor = $data_armors[i] next if armor.name.empty? $game_party.gain_item(armor, 1) end
#获取全部防具
for i in 1..$data_armors.length - 1
armor = $data_armors[i]
next if armor.name.empty?
$game_party.gain_item(armor, 1)
end
。。。谁能告诉我为什么for item in $data_items不管用啊。。。
|