console gives a strange error

Hey guys, I’m new here and i have a question.
The console gives this problem like a 1000 times when i play the game.

NullReferenceException: Object reference not set to an instance of an object
Boo.Lang.Runtime.RuntimeServices.InvokeBinaryOperator (System.String operatorName, System.Object lhs, System.Object rhs)
gunmovement.Update () (at Assets/Standard Assets/Scripts/gunmovement.js:17)

Do some one knows how i can solve this problem?

There is a variable that has to be set to a valid value, either via the Inspector or via a snippet of code in Start/Awake. Without the code it is hard to say which variable, though.

But if it is the same as your last script (it probably is), it would be the ‘gun’ variable. Drag your gun object from the project folder into the respective slot in the Inspector, when you select the object that script is attached to.