Unity wont let me apply script to game objects

I am trying to add sp,e script to my game objects but for some reason, Unity keeps spitting back this statement.

“Can’t add script behaviour GUI_Standard. You need to fix all compile errors in all scripts first!”

None of my scripts are bad and I added a mesh collider to every object. to separate the prefab.

What do you guys think could be the reason to why I keep getting this error?

You must have errors in your console (Ctrl + Shift + C). Show us those, and the code associated.

i tried this one just to see what happens and i tried a few others that should work and it still wont read it BTW iam using javascript can java work on unity:cry: thanks

We usually use the head section for functions (to be sure that the functions are loaded before they are called).

You don’t directly apply HTML/JavaScript to unity. Rather Unity’s JavaScript is similar in syntax only (but quickly diverges). Read over the resources here and you should get a handle on it:

http://forum.unity3d.com/threads/19302-About-Scripting
http://unity3d.com/support/resources/

var speed = 3.0;
var rotateSpeed = 3.0;
function Update ()
{
var controller : CharacterController = GetComponent(CharacterController);
transform.Rotate(0, Input.GetAxis (“Horizontal”) * rotateSpeed, 0);
var forward = transform.TransformDirection(Vector3.forward);
var curSpeed = speed * Input.GetAxis (“Vertical”);
controller.SimpleMove(forward * curSpeed);
}
@script RequireComponent(CharacterController)

how about this one i got from tornadotwins it wont work either but i saw it work for the tornadotwins on youtube

Welcome to the forum, aftah!

Are you getting any error messages when you try to use that code?