Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

string.Split('/') gets Incorect format error on run?

$
0
0
I have used this a bunch of times and am using it the same way in other places but I keep getting this error when I try to use it here " System.FormatException: Input string was not in the correct format at System.Int32.Parse (System.String s) [0x00010] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Int32.cs:629 " This is the code part string loadedData = UnicodeEncoding.Unicode.GetString(SaveWorld.ReadFile(SaveWorld.saveFolder + "/worlds/" + SaveWorld.saveworld.worldName + "/" + playerName + ".txt")); string copy = loadedData.ToString(); string[] splitData = copy.Split ("/"[0]); List loadedSlots = new List (); Debug.Log(loadedData); This is what the loadedData string containes "3/99/4/99/5/99/6/99/7/99/8/99/10/99/11/99/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/"

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>