Based on the error there is likely a problem in your modulator and/or controller. As the error message indicates, the gate signal is changing every simulation time step.
Look at the PWM output of your controller and see if there are multiple gate changes within a switching period. Make sure your modulation index input does not change faster than your carrier signal.
You will receive a more concrete answer if you post your model.