try
{
for (int i = 0; i < 4; i++)
{
playerGuess[i] = int.Parse(Console.ReadLine()); //says this is the error
}
}
catch (Exception ex)
{
Console.WriteLine("{0} Exception caught", ex);
Console.Read();
}
I run this code, and for some reason, it outputs the following errors:
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Number.ParseInt32(ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info)
at System.Convert.ToInt32(String value)
I tried fixes I've seen on another thread like this, but I can't get them to work. any ideas?