You get that error when you're squadded with a ship, to which you're not assigned Pilot. In other words, when a squad pre-exists you being assigned Pilot to one ship, but you're not assigned all ships.