Im trying to run a string as a command but I get this error.
`UnityScript.Scripting.IEvaluationDomainProvider’ interface member implementation must be public or explicit.
Why? Here is the section of script.
#pragma strict
function Start(){
// Call function to extract the number from the string
ConvertToInt(transform.tag);
terroristNumber = ConvertToInt(transform.tag);
// Then convert the extracted number into a String and add it to terroristHealth so the health in GlobalVars.js can be deducted
myString = ("globalVars.GetComponent(GlobalVars).terroristHealth" + terroristNumber.ToString());
}
function Update(){
eval(myString);
}
function ConvertToInt(stringContainingNumber : String) : int
{
return System.Convert.ToInt32(stringContainingNumber.Substring(stringContainingNumber.ToList().FindIndex(function(c) char.IsDigit(c))));
}