Your question is not clear. For example, what does "they gave me a new one" mean? It sounds like you need to take copies of all of your documentation (including your passport, I94 entry card, visa stamp, original H-1B approved petition and any further documentation sent to and received from USCIS) to an attorney and have him/her review it to determine what can be done. Perhaps you need to see a new attorney to get another opinion. Your question here is just too vague.
I agree with Ms. Wasser that you need to consult an immigration attorney in person ASAP, with originals of all your documents. Asking for general advice in this type of situation cannot help you form the correct strategy, because an attorney needs to see and review your status documents to determine what happened.
If I were to hazard a guess based on your description, it sounds as though you obtained a second H-1B approval that did not include a change of status because it was untimely filed, and therefore you have been out of status since the expiration of the previous I-94. Because you did not promptly travel abroad to obtain a new H-1B visa once you obtained that new approval, it would be inadvisable to do so now, as you have since accrued over a year of unlawful presence, and could be barred for 10 years if you left the US and attempted to return.
There is a mechanism available to allow you to ask the CIS to go back and grant status Nunc Pro Tunc. The process is subjective to the CIS Officer reviewing the case and is generally granted when there is not such a long time lapse. You have mentioned 2 years. That is a very long time. However, you can certainly try a Nunc Pro Tunc case.