Undefined method for nil:NilClass"

After deleting a room the room the user was in at the time is now giving the below error.

%% Sorry! The code lost its mind while executing a command. Not your fault.
Please send this error information to the admins and tell them what you were doing at the time:
Description: “look”
Error: “undefined method `characters’ for nil:NilClass”

Help!

1 Like

Oops, it should have moved you before it actually deleted the room. I’ll add that to the bug list.

Going offstage should get you out of the broken room. Then do onstage/reset to reset your last IC position so you don’t get re-broken when you go back IC.

Let me know if that doesn’t fix things for you.

The room with the error isn’t the one that was deleted.

R-128 was deleted, the user was in R-5 and R-5 is showing the error on every command initiated while in that room. (ex: tel, look)

Wait, now I’m confused. I don’t know why deleting one room would cause an error in a completely different room.

Can you please provide the detailed error from the debug log?

I’m not 100% sure the error is related to the room being deleted. But that’s the last thing the user did before the error occurred. Here’s the first error from the log:

2019-04-18 22:54:23 DEBUG - AresMUSH::Describe::LookCmd: ID=263 Enactor=Noir Cmd=look

2019-04-18 22:54:21 ERROR - Error in Handling CharConnectedEvent.: client= error=undefined method characters' for nil:NilClass backtrace=["/home/ares/aresmush/plugins/describe/templates/room_template.rb:78:infoyer_status’", “(erubis):30:in block (2 levels) in evaluate'", "(erubis):29:ineach’”, “(erubis):29:in each_with_index'", "(erubis):29:inblock in evaluate’”, “/home/ares/.rvm/gems/ruby-2.6.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in instance_eval'", "/home/ares/.rvm/gems/ruby-2.6.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:inevaluate’”, “/home/ares/aresmush/engine/aresmush/templates/erb_template_renderer.rb:16:in render'", "/home/ares/aresmush/plugins/rooms/helpers.rb:13:inemit_here_desc’”, “/home/ares/aresmush/plugins/rooms/events/char_connected_event_handler.rb:6:in `on_event’”]

Ah okay - that room is set to be a foyer and it’s a bug in the foyer code. I’ll fix that.

To help you immediately, you need to remove the exit that’s leading to nowhere.

I think this will do it:

  • Set the room to NOT be a foyer (teleport to the broken room with a builder/coder char and use foyer off)
  • Find the exit that has a numbered name but leads nowhere - that’s the broken exit.
  • Delete that exit (using destroy <exit name>)

Thanks! foyer off fixed it.