Martin Jenkins, 44, of Standhill Crescent, New Lodge, appeared in Barnsley Magistrates’ Court on Wednesday charged with criminal damage.
Jenkins, who suffers from epilepsy, broke a window on a property his friend was living in as he believed he had taken some medication belonging to him on the evening of December 20.
Phil Stables, defending, said Jenkins was unsure whether he had broken into the property or was invited in, but once he had entered the tenant phoned the police and he left.
Mr Stables said Jenkins had a ‘lengthy record’ comprising more than 80 offences and 20 prison sentences.
However, since 2017 he had ‘put his offending behind him’.
Jenkins was ordered to pay £285.09 compensation and costs of £85.