Errors while running my dynare code

First of all I want to express my thanks to all those having guided me until now.
Second, I will kindly ask you to clarify me, if possible about the errors below, listed after running my .mod file in matlab.
How should I do to understand the source of such errors …if it was about debugging in was simple … I was looking at my code to a certain line and column … but at this stage I just enter their code and I do not understand anything …

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

Starting Dynare (version 4.2.1).
Starting preprocessing of the model file …
Substitution of endo lags >= 2: added 12 auxiliary variables and equations.
Found 67 equation(s).
Evaluating expressions…done
Computing static model derivatives:

  • order 1
    Computing dynamic model derivatives:
  • order 1
    Processing outputs …done
    Preprocessing completed.
    Starting MATLAB/Octave computing.

This version of Dynare cannot estimate non linearized models!
Set “order” equal to 1.

??? Attempted to access k(1); index out of bounds because

Error in ==> draw_prior_density at 120
binf = abscissa(k(1));

Error in ==> plot_priors at 101
[x,f,abscissa,dens,binf,bsup] =

Error in ==> dynare_estimation_init at 125

Error in ==> dynare_estimation_1 at 37
[data,rawdata,xparam1] = dynare_estimation_init(var_list_);

Error in ==> dynare_estimation at 62

Error in ==> Dynare_code_COS_3 at 1147

Error in ==> dynare at 132
evalin(‘base’,fname) ;

Thanks in advance for any useful advice (P.S. I am a beginner in DSGE … so any advice should be explicitly presented (not very technically) so that I can understand it).
Best regards,

Please upgrade to a recent Dynare version and see if there is a more explicit error message. Or post the mod-file.

And don’t forget to remove the old version. If it still says

you are still using the wrong version.