- Home /
Question by
RealMTG · Sep 16, 2015 at 03:51 PM ·
error messagefile
FormatException: Unknown char
Hi
I am trying to read information from a file and when it comes to a certain part is gives me the error "FormatException: Unkown char: C". I would suspect it being "Cannon Cube" which is located in the file but in the error message it says there's something wrong with the line that handles scaling. These are the lines that being used.
case 10:
//Grab the Z scale
(Vector3)tempScale = new Vector3(tempScale.x, tempScale.y, float.Parse(currentRead));
break;
case 11:
//Grab the cube name
(string)tempCubeName = currentRead(string);
break;
Please keep in mind that the "(Vector3)" and "(string)" aren't a part of the script. I just added them here to show what they are.
I really don't see anything wrong here at all. If you can help me in any way please tell me!
Thanks
Comment
I found out that it is reading on the wrong line. It reads on the next line it is supposed to read on.