File not reading correctly
#3

Reread your code step by step. Look what do you see. Now do it again. And again. And one more time to be sure. Now you know that loop is fired up once. But why doesn't it work further?

pawn Код:
while(fread(example, string2212))
{
    if(!strcmp(playerip, string2212, true, 16)) {
        format(str123,sizeof(str123),"{00FF40}Your IP has been banned from this server\nOutput: %s\n{FF8000}To request a unban, visit http://www.gta-zombies.net and take a screen shot of this!",string2212);
        ShowPlayerDialog(playerid,9781,DIALOG_STYLE_MSGBOX,"{FF0000}You're banned from this server.",str123,"Okay","");
        SetTimerEx("KickPlayer",1000,0,"i",playerid);
    }
    fclose(example); //This line
    return 0; //This line
}
What does fclose do? What does return do? You should know that by now.

pawn Код:
while(fread(example, string2212))
{
    if(!strcmp(playerip, string2212, true, 16)) {
        format(str123,sizeof(str123),"{00FF40}Your IP has been banned from this server\nOutput: %s\n{FF8000}To request a unban, visit http://www.gta-zombies.net and take a screen shot of this!",string2212);
        ShowPlayerDialog(playerid,9781,DIALOG_STYLE_MSGBOX,"{FF0000}You're banned from this server.",str123,"Okay","");
        SetTimerEx("KickPlayer",1000,0,"i",playerid);
        break;
    }
}
fclose(example);
return 0;
Have fun
Reply


Messages In This Thread
File not reading correctly - by Infinity90 - 24.02.2013, 12:10
Re: File not reading correctly - by Infinity90 - 24.02.2013, 14:15
Re: File not reading correctly - by Misiur - 24.02.2013, 14:20

Forum Jump:


Users browsing this thread: 1 Guest(s)