sentences: ""However, during his reign as emperor many losses were inflicted on his kingdom by the Ghaznavids of Afghanistan.During the battle of Chach between Mahmud and Anandapala, it is stated that ""a body of 30,000 Gakhars fought alongside as soldiers for the Shahi Emperor and incurred huge losses for the Ghaznavids"".