You mentioned the pain below your ribcage on the right side. I get a cramping type pain there when I am not drinking enough. It's the first sure sign I need to Pump Up The Volume. (80's--anyone remember?) (Sorry, it couldn't be helped)
As has been said it sounds like you got yourself into very dangerous territory. It's a short ride from overexertion to heat stroke and serious medical issues.