A bit odd problem.
At row 71 I have
%%%Labor supply
w_flex=(eta_w_ar/(eta_w_ar-1))*(n_flex^phi)*THETA_flex/lambda_flex;
%w_flex=1.1111111*(n_flex^phi)*THETA_flex/lambda_flex;
When I switch between these two equations, equation
w_flex=1.1111111*(n_flex^phi)*THETA_flex/lambda_flex;
works perfectly even though the steady state value of eta_w_ar=10 which means that (eta_w_ar/(eta_w_ar-1))=1.11111111111 is identical. But equation
w_flex=(eta_w_ar/(eta_w_ar-1))*(n_flex^phi)*THETA_flex/lambda_flex;
generates an error with the BK conditions
Please note, eta_w_ar follows an ARMA(1) process which is why eta_w_ar=10 when its shock is set to 0. I attach the code as well.