First, I just want to mention that variable-step solvers are more accurate and typically faster than fixed-step solvers for simulating power electronic systems.
The reason you are seeing this error is because that particular C-Script block is using a Discrete-Variable sample time. This means it uses the NextSampleHit macro to specify the next simulation time, at which the block should execute. This is not supported with fixed-step simulations (or code generation), as PLECS cannot guarantee that it can fulfill the request since the NextSampleHit might not be an integer multiple of the fixed step size.
If you click on the “Help” button of the C-script block, you will notice that there are four types of Sample time possible. Apart from “Discrete-Variable”, you can use all the other Sample time types with fixed-step solver. If you are using “Discrete-Periodic”, the sample period and sample offset should be an integer multiple of the base step size.
To learn more about the "Discrete-Variable Sample Time", click on "Sample Time" .