Hi ,
I have a cavas with an inputField, But i want to store the string of the inputfield into an int. ( lets say the strings is “10” , I want that string to be converted to an int)
I’ve found some solution on the internet about a function called convert.int32(string) but whenever i type the function’ Convert’ into monoDevelop it doesn’t recognize it. Maybe I explained it bad , but here is the code i’m struggling with :
public List<int> WageOfPlayer = new List<int> ();
public List <InputField> AmountOfCoins = new List<InputField> ();
void Start () {
WageOfPlayer [0] = AmountOfCoins [0].text;
// I want to convert the text of amount of coins into an int so that i can store it in the WageOfPlayer list so i can make calculations with it
}
Thank you in advance.