Hi everyone, I have an error in my Unityscript script and I not sure what is wrong. it says self.ExampleList.get_(self a) cannot be assigned to. Any idea how to fix it?
#pragma strict
import System.Collections.Generic;
var ExampleList:List.<int> = new List.<int>();
public var a:int;
function OnGUI(){
for ( a = 0; a <ExampleList.Count; a++)
if (GUILayout.Button("+", GUILayout.Width(50), GUILayout.Height(30)))
{
//self.ExampleList.get_(self a) cannot be assigned to
ExampleList[a]++;
}
for (var a = 0; a <ExampleList.Count; a++)
//there is already a variable named a.
for (var a = 0; a <ExampleList.Count; a++)