Why not wrk? strcmp + reading file!
#1

pawn Код:
new player[MAX_PLAYER_NAME], string[128];

GetPlayerName(playerid,player,sizeof(player));

new File:file = fopen("armysafe.txt",io_read);

while(fread(file,string,sizeof(string)))
{
  if(strcmp(string, player, true))
  {
    SendClientMessage(playerid,COLOR_RED,"Yes, your name is in the file called armysafe.txt");
    printf("%s",string);
  }
}
I had 20 names in the file. One of which was the name I am connected with but it dont detect it?
Reply


Messages In This Thread
Why not wrk? strcmp + reading file! - by BMUK - 01.10.2009, 20:04
Re: Why not wrk? strcmp + reading file! - by brett7 - 01.10.2009, 20:19
Re: Why not wrk? strcmp + reading file! - by Jamesy - 01.10.2009, 20:25
Re: Why not wrk? strcmp + reading file! - by dice7 - 01.10.2009, 20:49
Re: Why not wrk? strcmp + reading file! - by BMUK - 01.10.2009, 21:03
Re: Why not wrk? strcmp + reading file! - by dice7 - 01.10.2009, 21:12
Re: Why not wrk? strcmp + reading file! - by BMUK - 01.10.2009, 21:27
Re: Why not wrk? strcmp + reading file! - by dice7 - 01.10.2009, 21:30
Re: Why not wrk? strcmp + reading file! - by Jamesy - 01.10.2009, 21:37
Re: Why not wrk? strcmp + reading file! - by BMUK - 01.10.2009, 21:44

Forum Jump:


Users browsing this thread: 1 Guest(s)