A Mansfield youth was caught with cocaine outside a house known to police for drug dealing, a court heard.
Mac Holbrook, 19, of Winthorpe Street, admitted possessing the Class A drug when he was arrested on Alcock Avenue, on July 8.
Police officers saw a VW Golf parked outside an address which intelligence suggested was being used to deal drugs, said Ruth Snodin, prosecuting.
They smelled cannabis and searched the car, finding two small bags of white powder.
Holbrook told police it was the drug M-Cat, or mephedrone, but tests identified it as cocaine and he later tested positive for that.
Yvonne Wragg, mitigating, said Holbrook had been recently laid off from work but was looking for a job.
He was fined £120 and ordered to pay £50 court costs and a £30 victim surcharge.