Quantcast
Channel: Latest Questions by Monko
Viewing all articles
Browse latest Browse all 34

Calling an Array[] for a function is sending an error.

$
0
0
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?

Viewing all articles
Browse latest Browse all 34

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>