The error means that
cursed_weapons from the
Game_System class is nil.
You can think of it as if it doesn't exists.
Are you sure you have initialized the variables in
Game_System like you should?
I don't like that you can't by color alone see which equipped item is cursed. All are just the same color.
Edit: The color problem is easily fixed. Replace the first with the latter in
class Window_EquipRight < Window_Selectable# ---------------------------
def draw_item_name(item, x, y)
if item == nil
return
end
bitmap = RPG::Cache.icon(item.icon_name)
if item.is_a?(RPG::Weapon) && $game_system.cursed_weapons.include?(item.id)
self.contents.font.color = cursed_color
end
if item.is_a?(RPG::Armor) && $game_system.cursed_armors.include?(item.id)
self.contents.font.color = cursed_color
end
self.contents.draw_text(x + 28, y, 212, 32, item.name)
end
# ---------------------------
def draw_item_name(item, x, y)
if item == nil
return
end
self.contents.font.color = normal_color
bitmap = RPG::Cache.icon(item.icon_name)
if item.is_a?(RPG::Weapon) && $game_system.cursed_weapons.include?(item.id)
self.contents.font.color = cursed_color
end
if item.is_a?(RPG::Armor) && $game_system.cursed_armors.include?(item.id)
self.contents.font.color = cursed_color
end
self.contents.draw_text(x + 28, y, 212, 32, item.name)
end
The quick will notice that I've only added
self.contents.font.color = normal_colorAs I said, simple fix.