Differential Equations – Discrete Variables in ParametricNDSolve

I'm trying to write a stochastic differential equation with the help of ParametricNDSolve and WhenEvents:

s = ParametricNDSolve[{V'
By pieces[{{(a + mu
V
b * (V
WhenEvent[Mod[t, dt] == 0., mu
m & # 39;
By pieces[{{0V[{{0V[{{0V[{{0V
V[0] == Vt0, m[0] == 0, mu[0] == 0}, {V, m, mu}, {t, tmin, tmax},
DiscreteVariable -> {mu}, {Vt0, a, b, c, V0}]

but I receive the error message:

ParametricNDSolve :: dsvar: DiscreteVariables -> {mu} can not be used as a variable.

Could you help me with this plz?