I've been creating a tele-transportation script that gets the coordinates from an sql server based database. After downloading the data and splitting it with Regex.Split, I have to parse it into a float so the vector3 gets the numbers.
My problem is that, even though it works and during gameplay everything functions, in the console I get format exception messages.
"FormatException: Invalid format. System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider)"
asked Mar 08, 2012 at 10:38 AM
The question has been closed Nov 14, 2012 at 04:03 PM by Fattie for the following reason:
Ok, I don't know WHY that works, but I've looked at other answers and found that parseFloat() doesn't give that error, so I just used that and I no longer receive the error.
Sorry 'bout that :)
*note: if the admins want to delete this question, feel free.
answered Mar 08, 2012 at 11:06 AM
Well, wouldn't it be interesting how your returned data looks like? That's the real problem.
I guess it's something like:
If you split it at "
Why do you use xml for returning 3 values? Just 3 comma-seperated-values would be enough. If you have to use xml, why do you parse the xml string manually? There are many xml parsers out there.
Some further side-notes:
answered Mar 08, 2012 at 11:10 AM