hello, i have this code, just an array and method, i want to take an determinate value from the array and use like a true valor.
But the code is wrong…and i dont understand why… THANK YOU !!!
THis is the Error ( Not all code paths return a value (CS0161) (Assembly-CSharp) )
public class BusquedaArray : MonoBehaviour {
public string paisesEuropeos = new string{ “España”, “Francia”, “Alemania”, “Italia”, “Inglaterra” };
bool CheckPais ( ){
for (int i = 0; i < paisesEuropeos.Length; i++) {
if (paisesEuropeos *== "Chile") {*
-
return true;*
-
} else {*
-
return false;*
-
}*
-
}*
-
}*
}