one has nothing to do with the other.
Gambling losses are reported on Sch A.
Deductible expenses related to your automobile used for a business (whether the mileage method or the actual method) is reported on Sch C.
If you report gambling losses on Sch A, it has no impact on using the mileage method on Sch C.