What's Wrong With This Script?

I’m trying to make a strategy game and i’m some scripts from a tutorial, they say that it will make the unit move, but when i click on the unit and click on the ground next to it i just get this message and he doesn’t move.

NullReferenceException: Object reference not set to an instance of an object

i won’t post them cause they’re really long, if you don’t know how to fix it by the error, could you please tell me where i can find a tutorial with good scripts?

The variable hasn’t been set, so either assign it in code, or drag and drop the object onto the relevant field on the script in the inspector.