Closed robinmoon2 closed 7 months ago
Can you your entire player class? There should also be more details on that exception as well.
So this is the player class :
Then I built the PlayerList class :
And this is where I call the function to Read and Write on the YAML File.
The function Writing works perfectly but not the reading one.
What do you mean by "Can you your entire player class" ?
I don't find any more details about this exception on the repo.
You need a parameterless constructor on your player class. Add that in there and it should work.
Did that resolve the problem?
Yes this solves the problem at perfection.
Thanks you a lot :)
Hello, I have a problem. I have a code that can write this kind of YAML file :
I use the serializer to write the YAML file and it works pretty well. But when I need to read it with the deserializer and put it in a list of players it doesn't work and I have the error message following : Unhandled exception. (Line: 1, Col: 3, Idx: 2) - (Line: 1, Col: 3, Idx: 2): Exception during deserialization.
I put the 2 function below, if someone have the solution it will really help me out.