I've been constantly wetting my pants with no warning, what could be wrong?

Bladder spasms/OAB. Oab (overactive bladder) can occur for no good reason or due to neurologic problem or bladder cancer. Meds (pills/patch/gel) can control symptoms but do not cure. Behavioral therapy, neuromodulation (electrical stimulation to help nerves work better) &injection of Botox into bladder are effective treatments. Depending on age, exam& urinalysis, cystoscopy (look inside bladder may be needed.
Urge incontinence. The most common condition causing these symptoms is urge incontinence. This is due to an overactive detrusor muscle (of the bladder) which inappropriately tries to contract before the bladder becomes full, forcing the urine out prematurely. There are other conditions, such as diabetes and neurological problems, which may need to be ruled out. Ui can be treated with drugs or sacral nerve therapy.
Urge incontinence. Incontinence (unwanted leakage of urine) can be due to stress (activity, cough, strain) or urge (uncontrolled bladder contraction) or a combination of both (mixed incontinence). Sometimes leakage may be associated with infection. You may be suffering from urge type incontinence which can be treated with medication. You should see your primary physician to discuss this further.
Many causes. Stress urinary incontinence occurs with coughing, sneezing or straining, worth trying kegel's exercises, best reated with suspension or sling procedure. Lack of bladder sensation can be caused by diabetes. Overactive bladder can be provoked by caffeine or acid producing foods or beverages and can respond nicely to anticholinergic medications(oxybutinin or Detrol (tolterodine) etc). ? Consult with gyn-urologist.