Sudden error in code

I think it might be better that way. For the spritePosition, it would be for the player’s ship. Would you know how I can get that done, please? I’d also like to know how I can implement the keyboard button ‘spacebar’ to fire the bullet(s).