17.08.2013, 21:39
Do as I say:
- Firstly, try to find why is it not working. Are you sure you stored banned person in the file by opening the file and searching for banned person. If it is there it's not problem with writing- banning.
- Secondly, after
"fread(BanCheckNom, strFromFile2);"
put this line:
printf("%s",strFromFile2);
and see if it is read good.
- Thirdly, before
if(strcmp(playercheck, arrCoords[0], true) == 0)
put
printf(" (%s)-(%d) (%s)-(%d)",playercheck,strlen(playercheck),arrCoords[0],strlen(arrCoords[0]));
and see if the comparation is good.
One of those has to be the problem.
Remember, it's important to know how to debug the program.
- Firstly, try to find why is it not working. Are you sure you stored banned person in the file by opening the file and searching for banned person. If it is there it's not problem with writing- banning.
- Secondly, after
"fread(BanCheckNom, strFromFile2);"
put this line:
printf("%s",strFromFile2);
and see if it is read good.
- Thirdly, before
if(strcmp(playercheck, arrCoords[0], true) == 0)
put
printf(" (%s)-(%d) (%s)-(%d)",playercheck,strlen(playercheck),arrCoords[0],strlen(arrCoords[0]));
and see if the comparation is good.
One of those has to be the problem.
Remember, it's important to know how to debug the program.