When you text someone about a drug deal or any other illegal activity, just make sure you know who you're talking to.

William Lamberson, 29, of Port St. Lucie, Florida, accidentally texted the captain of the Martin County Sheriff's Narcotics Unit last month, thinking he was a drug dealer.

The conversation between the cop and Lamberson can be read below, courtesy of Martin County Sheriff's Office.

Lamberson agreed to meet for a cocaine deal outside a bar. When he arrived with 1.2 ounces of blow on him, he was met by detectives waiting to arrest him. Lamberson was charged with possession of a controlled substance with intent to sell.

Police have no clue as to how Lamberson got the cop's number, because they had never met before.

"We think it was just a misdial," said Christine Weiss, public information officer for the Martin County Sheriff's Office.

More From K99