- Home /
Question by
Gusic · Apr 05, 2014 at 08:17 PM ·
2djavascriptfloat
Insert a semicolon at the end Error. (JavaScript)
Hi Guys, I keep getting a error about adding a semicolon when i already have one.
#pragma strict
var fireButton : GUITexture;
var Player : GameObject;
var playerSpeed : float 10.0f;
function Start () {
}
function Update(){
for (var evt : Touch in Input.touches) {
var HitTest1 = fireButton.HitTest(evt.position);
if (evt.phase == TouchPhase.Began) {
if(HitTest1){
//do something when button is hit
Player.transform.position += Vector3.right * Time.deltaTime* playerSpeed;
} } } }
Thank You
answers.png
(12.4 kB)
Comment
Line 4......................... = 10.0f ;
= = = = = = = = = = = = = = =
i dont think it worked now it gives me unexpected token: 10.0f error
Best Answer
Answer by sumeetkhobare · Apr 05, 2014 at 08:51 PM
var playerSpeed : float = 10.0f;
Use this man... :D
Mark my answer as solved if it fixes the problem.
Same exact thing I told you and yet that had supposedly caused some other odd error.