If unfortunately someone forgets to close a function statement gretl doesn't accept any script/console command any more. The only thing to do is to reboot gretl. Example.
function pippo(scalar a)
Obviously the nulldata command won't be read.