Put resid
before steady
to see the problematic equations. Also, in your parameter definitions, you have
c2_ss=d*(1+beta*habit)/((1-habit)*site*h_ss^phi);
c1_ss=(c_ss-d*c2_ss)/(1-d);
lamda_ss=(1-habit*beta)/c_ss/(1-habit);
site=lamda_ss*w_ss/(h_ss^phi);
Here, you use site
before it was computed.