Harry by all accounts served a very active role in Afghanistan, and could easily have been killed. He also allegedly had a Taliban bounty on him?
James IV of Scotland was the last sovereign from a now British country to die in combat. He perished at the Battle of Flodden fighting the English in 1513 in what was a crushing defeat for the Scots. Henry VIII was campaigning in France and the Scots in support of their "Auld Alliance" partners invaded Northumbria and were met by an army commanded by Thomas Howard, Earl of Surrey. The battle is the largest recorded on British soil with regard to participants, some estimates put the number for both sides as high as 50,000 with the Scots having the numerical advantage by some distance.
After James' death his son James V was crowned but being an infant was unable to rule. His mother, Henry VIII's sister, was placed as regent followed by a succession of different noblemen who were variously good, bad or indifferent until James V's majority in 1528.
Sources: The Lion in the North, Prebble. James IV, MacDougall