[Explanation]
His words, “on a campaign,” mean: on a military expedition.
The sense of the hadith is that when a person intends to perform a righteous act but is restrained by some impediment, the reward of what he intended is still recorded for him.
If, however, he was accustomed to doing that deed while free of excuses—meaning that when he was able, he actually performed it—and then later becomes unable, he is granted the full reward of the deed. This is because the Prophet ﷺ said: “When a servant falls ill or travels, there is recorded for him whatever he used to do while healthy and resident.” Hence, anyone who sincerely desires good and is eager for it—if it was his habit to perform the act but an obstacle subsequently prevents him—receives its reward in full.
For instance, if someone’s habit is to pray with the congregation in the mosque, yet an excuse such as sleep, illness, or the like holds him back, he is given the complete reward of the congregational prayer without any reduction.
Similarly, if a person is accustomed to offering voluntary prayers but is prevented by a hindrance and cannot perform them, he is granted their full reward. The same applies to one who regularly fasts three days each month: should an impediment stop him, the total reward is still written for him.
And so it is with many other comparable examples.