please help fast!!

Interesting. But see also

Apparently On Semi has a PN2222A and a P2n2222A, and they have opposite pinouts!
(that’s … gross. I’d guess that the P2n2222A is supposed to be more compatible with the metal-can versions, but still…) Check your part numbers carefully!

they have opposite pinouts!

In general a transistor can have any pinout, that is any pin can be any one of the collector emitter base.

That is the main reason I made my transistor tester, not only does it tell you if the transistor is working but it tells you the pinout. It saves looking up the data sheet all the time and works for transistors that you can't find the data sheet on. Also many transistors are pinned out in various different ways just depending on the last letter. http://www.thebox.myzen.co.uk/Hardware/Transistor_Tester.html

Neat tester. Can you implement the whole thing on an arduino, using, um, 9 digital IO pins and making use of tri-state? Each transistor pin would be connected directly to one pin ("power rail"), through a relatively low-value resistor to another pin ("load"), though a moderately high value resistor to a third pin ("Base resistor"), and you'd switch pins on or off through various configurations... So for testing an NPN transistor, it would look like this: I'm not sure where you'd put the A-D converter for measuring gain. Probably "Rload" would be spit into two pieces...

Can you implement the whole thing on an arduino, ...... and making use of tri-state?

Yes you probably can but I would have thought only for one type of transistor (PNP or NPN).

I'm not sure where you'd put the A-D converter for measuring gain.

That is the tricky part, as it stands the A/D converter is wired up as a single ended measuring system. That is it always measures the voltage with respect to ground. You can configure them to be differential in the chip so as to allow you to measure the voltage across a resistor (and hence the current through it). Alternatively if you have an analogue input to each of the raw transistor pins I am sure with a bit of clever maths and knowledge of what the other pins are doing you could work out the current.