|
-
February 8th, 2013, 09:29 AM
#3
Re: Conversion from char to int
I solved it, I was using a text file which was converted into a char array and then converted that into an integer in the loops posted above. Instead I just converted the text file straight from string to Int array.
I have no idea why I didn't do this in the first place but for the sake of really wanting to know why it didn't work anyway,
This was my code for converting the text file:
Code:
//reads the text file and
public void readMap(String map)
{
srMapReader = new StreamReader("Maps//"+map+".txt");//gets map
string readMap = srMapReader.ReadToEnd();//reads
readMapArray = readMap.ToCharArray();
srMapReader.Close();//ends stream
}
Thanks for the reply,
Arrokai
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|