When I get an error like that, the first thing I look for is new scripts that have been inserted in the wrong place.
When you get new scripts, they're USUALLY placed just above MAIN. Is it possible you have another script down there somewhere that redefines anything about $data_animations or Sprite_Character? I don't know enough to be sure, but it LOOKS like it's $data_animations that's the culprit.
Is it possible when you removed the caterpillar script, that you got rid of more than you should have?