need help coding

Status
Not open for further replies.

iamkyleme

Honorable
Dec 5, 2013
29
0
10,540
i need help with a peice of code hats been driving me insane its java script to get a vehicle to move in unity3d

var Speed = 10;
var Reverse = 2;
var Turning = 15;

function Update ()
{
rigidbody.AddRelativeForce{Vector3.forward*Input.GetAxis{*Vertical*} * Speed};
transform.rotate{Vector3.up * Turning * Input.Getaxis{*horizontal*};
}
 
Solution
You've got braces where you should have parentheses, and you haven't even closed all of the opened pairs of braces. You need to learn the basics of JS syntax before trying to use Unity.


ah right thank you , im actually doing these little youtube tutorials to learn unity and scripting.
this code is from one of the videos and i cant tell the difference between [ { ( on the video

thanks for the help bro :)

 


Youtube videos are the worst possible place to learn anything about software design.
 
Status
Not open for further replies.