im very new to java scripting and this script is a couple years old, when i try to save it, it says to fix compiling errors and the only errors are for the jumpspeed and maxslope, it thinks a semi colon should be in place of 20 and 60 and when i try to put an equal sign since that’s what i did for playerAcceleration and maxSpeed. but instead it just summoned 21 errors out of no were. without changing the error’s for maxslope and jumpspeed its just those that im getting error’s for. i havent even gotten to try and use the script because it keeps saying to fix the compiler errors.
#pragma strict
var playerAcceleration : float = 500;
var cameraObject : GameObject;
var maxSpeed : float = 20;
var horizontalMovement : Vector2;
var deaceleration : float;
var deacelerationX : float;
var deacelerationZ : float;
var jumpSpeed : float 20;
var maxSlope : float 60;
var grounded : boolean = false;
function Update ()
{
horizontalMovement = Vector2 (rigidbody.velocity.x,rigidbody.Velocity.z);
if (horizontalMovement.magnitude > maxSpeed)
{
horizontalMovement = horizontalMovement.normalized;
horizontalMovement *= maxSpeed;
}
rigidbody.velocity.x = horizontalMovement.x;
rigidbody.velocity.z = horizontalMovement.y;
if(input.GetAxis(“Horizontal”) == 0 && Input.GetAxis(“Vertical”) == 0);
{
rigidbody.velocity.x = Mathf.SmoothDamp(rigidbody.velocity.x,0,deacelerationX, deaceleration);
rigidbody.velocity.z = Mathf.SmoothDamp(rigidbody.velocity.z,0,deacelerationZ, deaceleration);
}
transform.rotation = Quaternion.Euler (0, cameraObject.GetComponent (mouselook).CurrentYRotation);
rigidbody.AddRelativeForce(Input.GetAxis(“Horizontal”) *playerAcceleration *Time.deltaTime,0,I);
}