Do you still eat chocolates and drink sodas even with medications?

My doctor says I'm not allowed to because of counteraction stuff but i can't help it! How do you control the cravings?