You were playing an illegal formation. Pricop has told you the basic rules, there are some more.