So I just added Sephiroth Spawn's Materia System to my game. And everything was going fine until I actually play-tested the game and then I recieved the following error:
Here is the section where the error occurs:
I'm using SDK 2.3 and I really need this error fixed to continue my project
Script 'Materia System' line 84: NoMethodError occured.
undefined method '[]' for nil:NilClass
Here is the section where the error occurs:
#============================================================================
# ** Weapon
#============================================================================
class Weapon
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :paired_materia
attr_accessor :single_materia
#--------------------------------------------------------------------------
# * Set Materia Slots
#--------------------------------------------------------------------------
def set_materia_slots(slots)
(84) @paired_materia, @single_materia = slots[0], slots[1]
end
end
# ** Weapon
#============================================================================
class Weapon
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :paired_materia
attr_accessor :single_materia
#--------------------------------------------------------------------------
# * Set Materia Slots
#--------------------------------------------------------------------------
def set_materia_slots(slots)
(84) @paired_materia, @single_materia = slots[0], slots[1]
end
end
I'm using SDK 2.3 and I really need this error fixed to continue my project