Help with undefined method error on character

Tat
Tue, 18 Sep 2018 01:24:08 +0000

So in my early days of creating this system, I created an attribute called ‘spell_mod’ on the character model, like so:

module AresMUSH
  class Character
    attribute :spell_mod, :type => DataType::Integer, :default => 0
    attribute :has_cast, :type => DataType::Boolean, :default => false
  end
end

I later decided that it made more sense on the combatant and moved it. Now, though, I get a recurring string of errors related to spell_mod (but for some reason never to has_cast, which also moved) any time a character does anything. It creates a small but noticeable lag on game.

For example, sending a message to the chat channel resulted in:

2018-09-18 01:22:26 WARN - Model AresMUSH::Character failed to respond to spell_mod undefined method `spell_mod=' for #<AresMUSH::Character:0x0000000002743838>
Did you mean?  spells_learned
2018-09-18 01:22:26 WARN - Model AresMUSH::Character failed to respond to spell_mod undefined method `spell_mod=' for #<AresMUSH::Character:0x00000000025125c8>
Did you mean?  spells_learned
2018-09-18 01:22:26 WARN - Model AresMUSH::Character failed to respond to spell_mod undefined method `spell_mod=' for #<AresMUSH::Character:0x00000000023c3e10>
Did you mean?  spells_learned
2018-09-18 01:22:27 WARN - Model AresMUSH::Character failed to respond to spell_mod undefined method `spell_mod=' for #<AresMUSH::Character:0x0000000004f9bc90>
Did you mean?  spells_learned
2018-09-18 01:22:27 WARN - Model AresMUSH::Character failed to respond to spell_mod undefined method `spell_mod=' for #<AresMUSH::Character:0x0000000004f73740>
Did you mean?  spells_learned
2018-09-18 01:22:27 WARN - Model AresMUSH::Character failed to respond to spell_mod undefined method `spell_mod=' for #<AresMUSH::Character:0x00000000047e0780>
Did you mean?  spells_learned
2018-09-18 01:22:27 WARN - Model AresMUSH::Character failed to respond to spell_mod undefined method `spell_mod=' for #<AresMUSH::Character:0x00000000047bcf60>
Did you mean?  spells_learned
2018-09-18 01:22:27 WARN - Model AresMUSH::Character failed to respond to spell_mod undefined method `spell_mod=' for #<AresMUSH::Character:0x00007fbb8c18d3d8>
Did you mean?  spells_learned
2018-09-18 01:22:27 WARN - Model AresMUSH::Character failed to respond to spell_mod undefined method `spell_mod=' for #<AresMUSH::Character:0x00007fbb8c17f788>
Did you mean?  spells_learned

I have no idea what’s causing this or how to fix it. Do you have any insight into how I might track down the root cause of this?