# behavior error ,behavior error

**URL:** https://discussions.unity.com/t/behavior-error-behavior-error/199642
**Category:** Questions & Answers
**Created:** [December 3, 2017, 9:42pm UTC](https://discussions.unity.com/t/behavior-error-behavior-error/199642 "2017-12-03T21:42:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Kira4220](https://avatars.discourse-cdn.com/v4/letter/k/b487fb/32.png) [@Kira4220](https://discussions.unity.com/u/Kira4220)
#### Post date: [December 3, 2017, 9:42pm UTC](https://discussions.unity.com/t/behavior-error-behavior-error/199642/1 "2017-12-03T21:42:15Z")

</div>

I’m using c sharp the error reads as No MonoBehavior scripts in the file, or their names do no match the file name.

using UnityEngine;

public class PlayerMovement : MonoBehaviour {

```
public Rigidbody rb; 

// Update is called once per frame

void FixedUpdate () 
{
	rb.AddForce (0, 0, 2000 * Time.deltaTime); 
}

```

},  
after trying to apply my script in unity i receive this error

The associated script can not be be loaded. Please fix any compile errors and assign a valid script.

also another error

No Mono Behavior scripts in the file, or their names do not match the file name.

I’m writing in c sharp on Mono Develop

using UnityEngine;

public class PlayerMovement : MonoBehaviour {

```
        public Rigidbody rb; 

void FixedUpdate () 
{
	rb.AddForce (0, 0, 2000 * Time.deltaTime); 
}

```

}

---

<div class="post-metadata">

### Author: ![jdean300](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jdean300](https://discussions.unity.com/u/jdean300)
#### Post date: [December 3, 2017, 10:06pm UTC](https://discussions.unity.com/t/behavior-error-behavior-error/199642/2 "2017-12-03T22:06:04Z")

</div>

MonoBehaviours must be in a file of the same name - so the file holding this PlayerMovement class must be named PlayerMovement.cs
