I have made the patch and it worked fine without any errors.
I also install greedy routing protocol
but scripts for this protocol give the same error as well.
I guess there might be some problem with my ns-2.33 installation. I had one more ns-2.33 installation in other directory that got corrupt. No sure what is causing the problem. I will test with AODV, DSDV and let you know.