3楼和4楼的脚本,有问题,需要一点点修改:
$data_items = load_data("Data/Items.rxdata") $data_weapons = load_data("Data/Weapons.rxdata") $data_armors = load_data("Data/Armors.rxdata") for j in 1..5000 $data_items[j] = RPG::Item.new if $data_items[j]==nil $data_weapons[j] = RPG::Weapon.new if $data_weapons[j]==nil $data_armors[j] = RPG::Armor.new if $data_armors[j]==nil end save_data($data_weapons,"Data/Weapons.rxdata") save_data($data_armors,"Data/Armors.rxdata") save_data($data_items,"Data/Items.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
for j in 1..5000
$data_items[j] = RPG::Item.new if $data_items[j]==nil
$data_weapons[j] = RPG::Weapon.new if $data_weapons[j]==nil
$data_armors[j] = RPG::Armor.new if $data_armors[j]==nil
end
save_data($data_weapons,"Data/Weapons.rxdata")
save_data($data_armors,"Data/Armors.rxdata")
save_data($data_items,"Data/Items.rxdata")
|