I'll use one sub-routine as the example as they're all the same:
#leghit
?(_dammamount < _dammunit): goto "exit" << Problem 3
_dammunit setdammage (_dammamount + 0.04) << Problem 1
~2
leg = true << Problem 2
goto "leghit"
? leg : goto "leghit" << Problem 2
_dammunit groupchat "AHHH MY LEGS."
goto "leghit"
Problem 1 is that the loop is not increasing the unit's damage. Every time it loops it sets the damage to a constant value of _dammamount + 0.04 but both of these values are constant. What you want to do is add 0.04 to the unit's current damage each time so the line should be:
_dammunit setdammage (0.04 + getdammage _dammunit)
Problem 2 is more of an observation because there's no effect: the lines
leg = true and ? leg : goto "leghit" are redundant, the script will always goto "leghit"
Problem 3 is how to stop the loop. Problem 3a is the line:
?(_dammamount < _dammunit): goto "exit"
You are comparing chalk and cheese, well, a unit to its damage or an object to a value.
Problem 3b is that you need to see a reduction in damage as the unit is healed, i.e:
If damagenow < damagewhenIlastincremented then stoptheloop
A fix would be:
#leghit
_dammunit groupchat "AHHH MY LEGS."
#leghitloop
~2
; check current damage against last increase to see if healing
? (Dammage _dammunit < _dammamount): goto "exit"
; increment unit's damage
_dammunit setdammage (0.04 + Dammage _dammunit)
; record current damage to check for healing
_dammamount = Dammage _dammunit
goto "leghitloop"
It could be reduced a bit more but the clarity might get lost.
Once you've got your head round that bit, you could reduce your script to one loop by using _wichpart to set a variable, say, _bloodloss to 0.02, 0.04 or 0.06 and use the line:
_dammunit setdammage ( _bloodloss + Dammage _dammunit)
Hope it helps!