Unable to compile arduino uno

I'm making a new project this morning. But suddenly i got this message while compiling:

An error occurred while uploading the sketch
avrdude: ser_open(): can't set com-state for "\.\COM3"

This never happens before. So then, i search for this kind of error and a lot of people tell to install the usb CH340g driver. So i install that driver but it didn't worked. I kept getting this message:

"The drive is successfully Pre-installed in advance"

Then i checked device manager and nothing's changed. But then i looked on my board and i realized my board is using atmega16u chip. So, is there atmega16u drivers?. if there is do i have to install the drivers? because i used this board for about 2 months now and this never happens to me.

Any help will be very helpful to me.
Thanks.

Hello Blinkvoid,

Thank you for sharing your issue with the Arduino community.

Please follow the advice below and let us know if they fix the issue:

  1. Try a new USB cable making sure it is a DATA USB one.

  2. Connect the board to a different computer and check if it has the same behavior.

  3. Update the drivers on the computer if using windows by following these instructions:
    https://www.arduino.cc/en/Guide/DriverInstallation

  4. Burn the bootloader using an additional Arduino board as a programmer. You can find the instructions for this procedure here: https://www.arduino.cc/en/Tutorial/ArduinoISP

If this does not help please contact Arduino Technical Support for further assistance.