You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
space-invaders-master/lib/space_invaders/game_objects/image_objects/ship.rb:100:in block in retarget_gun!': undefined method x' for nil:NilClass (NoMethodError)
bullet.target = @enemies.find(bullet.target.x)
^^
from space-invaders-master/lib/space_invaders/game_objects/image_objects/ammo.rb:52:in `block in bullets_without_target'
from space-invaders-master/lib/space_invaders/game_objects/image_objects/ammo.rb:52:in `each'
from space-invaders-master/lib/space_invaders/game_objects/image_objects/ammo.rb:52:in `bullets_without_target'
from space-invaders-master/lib/space_invaders/game_objects/image_objects/ship.rb:99:in `retarget_gun!'
from space-invaders-master/lib/space_invaders/game_objects/image_objects/ship.rb:71:in `draw'
from space-invaders-master/lib/space_invaders/scenes/main_scene.rb:50:in `each'
from space-invaders-master/lib/space_invaders/scenes/main_scene.rb:50:in `draw'
from space-invaders-master/lib/space_invaders/game.rb:21:in `draw'
from /usr/local/lib/ruby/gems/3.1.0/gems/gosu-1.4.3/lib/gosu/patches.rb:64:in `tick'
from lib/space_invaders.rb:6:in `<main>'
The text was updated successfully, but these errors were encountered:
Hi,
am I too fast?
space-invaders-master/lib/space_invaders/game_objects/image_objects/ship.rb:100:in
block in retarget_gun!': undefined method
x' for nil:NilClass (NoMethodError)The text was updated successfully, but these errors were encountered: