I need to finish this game and i keep running in to this error…
Assets/Scripts/BallControl.js(36,10): UCE0001: ‘;’ expected. Insert a semicolon at the end.
If you could help me I would be so happy.
Here is my script:
#pragma strict
var rotationSpeed = 100;
var jumpHeight = 8;
var playOnce = true;
private var isFalling = false;
function Update ()
{
//Handle ball rotation.
var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
rotation *= Time.deltaTime;
rigidbody.AddRelativeTorque (Vector3.back * rotation);
if (Input.GetKeyDown(KeyCode.W) && isFalling == false)
{
rigidbody.velocity.y = jumpHeight;
playOnceTrue();
}
isFalling = true;
}
function OnCollisionStay ()
{
if (playOnce == true)
(
Debug.Log("Test"));
playOnce = false;
isFalling = false;
}
function playOnceTrue () {
yeild WaitForSeconds (0.2);
playOnce = true;
}