4
By error translation says I have to put a ")" at the end of "type" however now there is a ")" at the end of the "type" I tried to change to "[ ]" but it didn’t work I tried to put 2 ")" as I have seen in other codes but also did not work
Cs(14,71): error CS1526: A new Expression requires () or [] after type
the second mistake tried nothing.
Cs(14,93): error CS8032: Internal Compiler error During Parsing, Run with -v for Details
the code :
using UnityEngine;
using System.Collections;
public class Dinheiro : MonoBehaviour {
public Vector2 velocity = new Vector2(0, -4);
public Vector3 velocity3D = new Vector3(0, -4, 0);
public float range = 4;
// Use this for initialization
void Start () {
//rigidbody2D.velocity = velocity;
transform.position = new Vector3(transform.position.x – range * Random.value, transform.position.y , transform.position.z);
}
// Update is called once per frame
void Update () {
transform.position += velocity3D * Time.deltaTime;
}
}
Gives error in which line?
– Jéf Bueno
Are you sure you saved the file before trying to run again? Apparently it’s all right. Test by swapping line 14 for
transform.position = new Vector3(0,0,0);
and see if the error persists. Then add the rest little by little.– Luiz Vieira
error is on line 14
– AKT Kamus
Which is line 14, the number, we saw, but we have no way of knowing where it is. For me line 14 is a blank line. And no line has anything related to the error presented.
– Maniero