Help guys I have a problem when following a tutorial in youtube from tornado twins.

Help guys i got a problem i followed every single world of his script and it seems fine for him but i got an error that says: Assets/Project1_assets/move_around.js(16,53): BCE0044: unexpected char: 0xAD.

His using Mac OS and I’m using windows so that may be the problem
The script:

#pragma strict
function Start () {}

var speed : float = 3.0;

var rotateSpeed : float = 3.0;

function Update ()
{

var controller : CharacterController = GetComponent(CharacterController);

// Rotate around Y - axis 
transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);

// Move forward / backwards
var forward = transform.TransformDirection(V­ector3.forward) 
var curSpeed = speed * input.GetAxis ("Vertical"); 
controller.SimpleMove(forward * curSpeed);

}

@script RequireComponent(CharacterController)

Can u guys pls tell me what i did wrong im using unity 4
THX!

2 Answers

2

var curSpeed = speed * input.GetAxis (“Vertical”);

It should be Input with cap I.

Usually these errors occur because some high-ascii value characters make their way into the script (values above 128). You can figure out what line by double clicking on the error in the Console and then opening Mono. Usually it can be solved if you open a new line below the line with the error, retyping the line exactly, then deleting the original line. Often there will be more than one line with the problem. @fafase’s answer is also a problem with this script.