I am writing a simple 2 model economies and I got this error, I am not sure where the mistake is? Is it my initial value or is there something wrong with my FOCs?

The BKK.pdf (41.7 KB) attached is the model derivation on paper;

```
var c cstar n nstar k kstar b bstar x xstar z zstar;
predetermined_variables k b;
varexo e estar;
parameters beta theta delta rho sigma a;
beta = 0.99;
delta = 0.025;
theta = 0.36;
a = 1;
rho = 0.98;
sigma = .00852;
model;
/*
First Order Conditions for Home Economy
*/
c + x + beta*(c/c(+1)) * b(+1) = (1-theta) * z * k^theta * n^(-theta) + theta * z * k^(theta - 1) * n^(1 - theta)*k(-1)+b;
k = (1-delta)*k(-1) + x;
1/c = beta * (1/c(+1)) * theta * z(+1) * k(+1)^(theta - 1) * n(+1)^(1 - theta)*k(-1) + (1-delta);
a/(1-n) = ((1-theta) * z * k^theta * n^(-theta))/c;
z = rho * z(-1) + e;
/*
First Order Condition of Foreign Country
*/
cstar + xstar + beta*(c/cstar(+1)) * bstar(+1) = (1-theta) * zstar * kstar^theta * nstar^(-theta) + theta * zstar * kstar^(theta - 1) * nstar^(1 - theta)*kstar(-1)+bstar;
kstar = (1-delta)*kstar(-1) + xstar;
1/cstar = beta * (1/cstar(+1)) * theta * zstar(+1) * kstar(+1)^(theta - 1) * nstar(+1)^(1 - theta)*kstar(-1) + (1-delta);
a/(1-nstar) = ((1-theta) * zstar * kstar^theta * nstar^(-theta))/cstar;
zstar = rho * zstar(-1) + estar;
/*
Resource Constraint
*/
z * k^(theta) * n^(1-theta) = c + x;
zstar * kstar^(theta) * nstar^(1-theta) = cstar + xstar;
end;
initval;
k = 10.368;
c = 0.811177;
n = 0.332289;
z = 0;
e = 0;
b = 0;
x = 0;
kstar = 10.368;
cstar = 0.811177;
nstar = 0.332289;
zstar = 0;
estar = 0;
bstar = 0;
xstar = 0;
end;
steady;
shocks;
var e = sigma^2;
var estar = sigma^2;
corr e, estar = 0.258;
end;
stoch_simul(hp_filter = 1600, order = 1, periods=125);[BKK.pdf|attachment](upload://p0SK0wjtvYs7gTedokVCNAQikMA.pdf) (41.7 KB)
```