Hi Welcome to Health care magic forum.
The causes for the absence or irregularity of the periods, are
anemia, infection, P.C.O.S.etc.
Of course the pills may cause the weight gain, but the weight gain may be due to some other cause like high calorie diet, sedantary living, etc.
I advise you to consult a physician for diagnosis and treatment, besides the usage of the pills.
Take more of green leafy vegetables, pulses, sprouts and
protein rich foods, to support the treatment.
Wishing for a quick and complete recovery.