All the results i get are
***
* **
** *
***
When it should be
***
***
***
***
I have this one array that gets a files data loaded into it.
map[592];
An example ofa map is:
Code: Select all
##### ## ## # #
##### ##### ##### ######## ##
##### ## # ## #### ###
######## ## ## ##### ### ####
##### ## ## ## #####
#############################
###### ######
###### ######
###### ######
###### ######
###### ######
###### ######
###### # # ######
######F # # * # * S ######
#############################
########### ###############
############# ###############
############# ###############
########### #############
abc
To make it easier to work with, im trying to get it into a 2D array
level[19][30];
19 because i dont WANT the password in mine, 30 because thats how many chars wide i want to read in. so, i basically want to transfer each line of that, into the 2D array according to each line. So, my current method is:
Code: Select all
j=0;
for(i=0; i<19; i++) {
for (z=0; z<30; z++) {
if(map[j] == '\n') {}
else {
level[i][z]=map[j];
}
j++;
}
}
***
* **
** *
***
Ive tried just about everything to no prevail.
If you need know more info to help solve this problem, please ask and i will supply. This little problem has held me back from progressing for 3 days now, its really getting annoying :(