Ask coding questions

← Back to all posts
Ruby error.
ia13ru (43)

I am making this small game. If you play for a while, you might notice this error popping up in the console. How do I fix it, if it even is fixable?

Coder100 (18071)

please be more specific with the error so you can get help faster.

ia13ru (43)

@Coder100 The error is:

Traceback (most recent call last):
  3: from main.rb:29:in `<main>`
  2: from main.rb:29:in `loop`
  1: from main.rb:66:in `block in <main>`
main.rb:15:in `moved': undefined method `[]=` for nil:NilClass (NoMethodError)
exit status 1