|
Hello all, 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)"
(comments are locked)
|
The question has been closed Nov 14 '12 at 04:03 PM by Fattie for the following reason:
Other
|
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.
(comments are locked)
|
|
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:
no, the data was actually split right, i had only the numbers, since in the php creating the array i wrote: echo xValue.""; anyway, i have already resolved it usint parseFloat() instead. thanks!
Mar 08 '12 at 11:45 AM
shaystibelman
(comments are locked)
|
