Optimal policy ramsey

Hello,
Can somebody please tell me what is wrong with my code?
Thanks in advancejjj.mod (6.3 KB)

In

    l           =   (rho*theta-1)*lam*(2-lam);

you are using an object lam that was not defined.