Arduino motor shield sketch problems

It probably means the compiler can't find the library containing AF_DCMotor. Have you downloaded it? If you have, what have you done with it?

Which version of the IDE are you using?