I am working in java script, and creating an array. For some reason, unity is giving me an error "implicit downcast from object to int"
Here is a sample of the code causing the error:
internal var testarray : Array[] = new Array [3];
function Start () {
testarray[0] = [0,1,2,3];
testarray[1] = [4,5,6,7];
testfunction(testarray[0][2]);
}
function testfunction ( testvar : int)
{
}
I get this error a lot, and its usually because I forgot do define a variable. So I fix it. But this time, I have defined the variable, and yet its still giving the error. Does anyone know why?
↧