Why I can not run the BGG1999 code?

Dear sir,
When I run the BGG1999.mod, the surface shows as follows:
Error using resid
Not enough input arguments.
Error in BGG1999.driver (line 547)
resid;
Error in dynare (line 278)
evalin(‘base’,[fname ‘.driver’]);
Error in run (line 2)
dynare BGG1999
How to solve it? Many thanks!
Matlab version: R2023a Dynare version: 5.4
Accessories are the code. When running the model, please input “run”.
BGG1999.zip (2.8 KB)

It seems you are using the unstable version, not Dynare 5.4. In Dynare 6, the resid(1) syntax will be phased out. See Breaking Features in Version 6 · Wiki · Dynare / dynare · GitLab

Hello zhiqing,
I’m using the code you provide to run BGG model,I spotted the irf under interest rate shock is weird,for example,under interest rate shock(contraction monetary policy),the output is increasing,do you know the reason?