Input string was not in the correct format In new proyect
I have the same code in other proyect and works fines, but now i have this error
//Store the current time when it starts
currentDate = UnbiasedTime.Instance.Now();
//Grab the old time from the player prefs as a long
long temp = Convert.ToInt64(PlayerPrefs.GetString("sysString")); // THIS LINE IS THE ERROR
//Convert the old time from binary to a DataTime variable
DateTime oldDate = DateTime.FromBinary(temp);
print("oldDate: " + oldDate);
//Use the Subtract method and store the result as a timespan variable
difference = currentDate.Subtract(oldDate);
print("Difference: " + difference);
Could someone help me? thanks for reading me
d.png
(9.6 kB)
Comment