static var counter;
How can your compiler know that this is an int? You have to define it as an int-
static var counter = 0;
or even better
static var counter : int = 0;
This is why I don't like UnityScript. Consider C#, that's the better option in my opinion.
↧