Deterministic model

i am trying to run a model with 30 equation, every time i run the dynare code, this error will be appeared:
There are 30 equations but 29 endogenous variables!

the dynare code and equation is:

var nod cp nos wp ip kp kpstar g cg p ig kg kgstar ih kh khstar icap kcap kcapstar xn mn tx bd m y w yp f ox;

varexo oa po e pstar ystar nosp op r em rstar;

parameters beta1 beta2 beta3 beta4 beta6 beta7 beta8 beta9 beta10 beta11 beta12 beta13 beta14 beta15 beta16 beta17 teta1 teta2 teta3
gamma delta rho sigma lambda nu mu1 mu2 epsilon1 epsilon2 epsilon3 epsilon5 epsilon6 epsilon7 tau psi1 psi2 phi1 phi2 phi3 phi4 phi5
alpha1 alpha2 alpha3 zeta;


//product market
nod = beta1cp + beta2ip + beta3g + beta4(xn-mn);
cp = beta6nos + beta7wp;
ip = gamma*(kpstar-kp);
(kp-kp(-1)) = gamma*(kpstar-kp);
kpstar = deltanos;
g = beta8
cg + beta9ig + beta10ih + beta11icap;
cg = (1-teta1-teta2-teta3)
ig = rho*(kgstar-kg);
(kg-kg(-1)) = rho*(kgstar-kg);
ih = sigma*(khstar-kh);
(kh-kh(-1)) = sigma*(khstar-kh);
icap = lambda*(kcapstar-kcap);
(kcap-kcap(-1)) = lambda*(kcapstar-kcap);
kgstar = teta1*(oa+po+e-p);
khstar = teta2*(oa+po+e-p);
kcapstar = teta3*(oa+po+e-p);
bd = beta12*((m-m(-1))-(p-p(-1)));
tx = beta13*(oa+po+e-p) + (1-beta13)nos;
xn = beta14
(e+pstar-p) + beta15ystar;
mn = beta16
y - beta17*(e+pstar-p);
y = nu*nos + (1-nu)*oa + (1-nu-mu2)po + (mu1-nu)(e-w) - (1-mu1-mu2)pstar;
yp = nu
nosp + (1-nu)*op + (1-nu-mu2)po + (mu1-nu)(e-w) - (1-mu1-mu2)*pstar;

//asset market
m-p = epsilon1nos - epsilon2(p-p(-1)) - epsilon3r;
wp = epsilon5
kp + epsilon6*(m-p)+ epsilon7yp;
(m-m(-1)) = tau
(r-rstar)+ f-f(-1);

//aggregate suplly and wage price nexus
p = mu1w + mu2(e+po) + (1-mu1-mu2)(e+pstar);
(w-w(-1)) = psi1
(nod-nos) + psi2*(p-p(-1));
nos = phi1kp + phi2kg + phi3kh + phi4kcap + phi5*em;

//oversea sector
(f-f(-1)) = alpha1*(xn-mn) + alpha2*(rstarf)+ alpha3(ox+po)-(1-alpha2-alpha3)(e-p);
ox = zeta

is endogenous variable and exogenous variable correct?
which equation is useless or can be omitted?
please help me?

You are the model builder and thus are the only one who can answer that question. Maybe you need to start with a simplified version of the model.