I had an engine failure due to pilot era on my 3rd or 4th flight lesson. I cut the dang gas off to both tanks when I was supposed to just switch tanks.
I was flying an old 1961 or was it 62 Piper Cherokee 160. To switch tanks you turn a handle on a dial. All the indicator marks on the dial could not be seen from the pilots chair. You just had to feel it hit the notches but if you didn't know about the notches then you may miss them as they were just slight bumps that you may not feel if you weren't aware of them.
Dial turned to:
8 o'clock - both tanks off
10 o'clock - left tank on
12 o'clock - both tanks off
2 o'clock - right tank on
4 o'clock - both tanks off
I didn't understand the dials and turned it passed 2 o'clock and shut off both tanks. I said to my instructor and I quote myself, "I think we just lost an engine." I knew that we only had one engine and he said, "Switch it BACK!" I was already doing that part and got the engine going rather quickly. I was at the Starkville Airport in pattern so we shouldn't have an issue getting to the runway as I was right beside it in pattern. I could have easily turned and coasted down but you only get one chance, no do overs.
We didn't figure out what happened until we got on the ground to investigate it.
My instructor made this comment, "Just another day of student pilots trying to kill me." I thought to myself but didn't say, "Maybe we should have discussed how to switch those tanks on the ground so this won't happen."