Hi chick i would go see the doctor and get an x-ray before you start to get worried,because it will make you feel worse. Are you coughing up blood or bring up green and brown stuff. Can you sleep lying down? do you feel short of breath? if you have none of these then i would rule out a lung problem. If you do have these then i would go see the doctor and they will give you some antibiotics to sort it out. It could be something as simple as you have pulled a muscle. Or really bad trapped wind i hope you get it sorted take care.
Maybe Gall Bladder ask the doctor they may do a hida scan..Low fat diet no eating at night, if you do some research you can get a list of foods you can eat, and ones that will trigger an attack ..
There are no doctors on this site but I can try to help you. Does it hurt when you breathe in? Do you have a dry cough or fever? It is possible you have inflammation inbetween the ribs, or pleuracy. You may need antibiotics so you should have a doctor listen to your breathing they can hear fluid on the lining inbetween the lung and ribcage. I have had this several times and it really hurts. You can start with a hot pack or hot water bottle and hold it agaisnt the area. It will temporarily feel better if this is pleuracy. But, you will still need to have the doctor listen.