Basic CIA model problem

Hello, I am trying to implement a basic cash in advance/limited participation model in dynare. But I have several questions.
First, I keep getting an error message about the rank condition.

[quote]There are 6 eigenvalue(s) larger than 1 in modulus
for 6 forward-looking variable(s)

The rank condition ISN’T verified!

Error using print_info (line 48)
Blanchard Kahn conditions are not satisfied: indeterminacy due to rank failure[/quote]

I know that dynare is stating a problem about having perfect collinearity in the model and I should replace one of the equations. Since I believe my model is correct, is hard for me to identify which equation is wrong. when I run model diagnostic for help I get the following message

[quote]>> model_diagnostics(M_, options_, oo_)
The following endogenous variables aren’t present at the current period in the model:
pi [/quote]

where pi is the inflation rate. In this model I should not have pi in the current period. So I don’t know if that is a problem, or is just stating a fact. Besides when I change the timing of the equation to have pi in the current period it states that I don’t have enough eigenvalues greater than 1.

Finally, a question about the sintaxis of the model. In this model the cash holdings are set a period earlier, so I set it as a predetermined variable. Could someone confirm that this is correct please.
Many Thanks!
CIA model.pdf (138 KB)
sec_year_paper_smallfirm06_con_bancos_c.mod (4.31 KB)

Just from the equations it is impossible to tell. At first sight, both the timing of the money stock and the inflation rate look weird.
Something in your model must determine inflation in the current period. If that is not the case in your model, the model is indeterminate, resulting in the rank failure. It cannot be that only pi(+1) shows up as in this case only expected inflation would play a role, but in the budget constraint what matters is actual inflation!