How come this works?
var array : int[];
var attempt = 3;
var n = 5;
var i : int = 5;
function Start (){
array = new int[10];
array *= attempt;*
}
But this doesn’t?
var array : int[];
var attempt = 3;
var n = 5;
var i : int;
function Start (){
for (var i = 0; i < 5; i++) {
array = new int[10];
array = attempt;
}
}
Also try to use #pragma strict as religiously as possible so you'll get more information about the errors before they strike.
– saveWhat is #pragma strict?
– anon36094622
– Tseng#pragma strictenables strong typing and some other stuff which typically works in "JavaScript/UnityScript" but don't in C# for example.