FormatException: String was not recognized as a valid Boolean (solved)
Posted: Sat Sep 05, 2020 1:00 pm
Saving code :
The output :
Loading code :
When loading, the first read string is ok, but the read bool is not ok. I've got the FormatException: String was not recognized as a valid Boolean
Any ideas ?
Code: Select all
public void SaveSequentially(int slot)
{
using (ES3Writer writer = ES3Writer.Create(filePath: GetSaveName(slot), settings))
{
writer.Write(SceneManager.GetActiveScene().name);
writer.Write(true);
writer.Write(false);
}
}
Code: Select all
{"lighttests"truefalse
}
Code: Select all
public void LoadSequentially(int slot)
{
using (ES3Reader reader = ES3Reader.Create(GetSaveName(slot), settings))
{
print(reader.Read<string>());
print(reader.Read<bool>());
print(reader.Read<bool>());
}
}
Any ideas ?