How to do this ?
#4

is there is something wrong with this code ?
all my script have the same method but my server crash because he cant write on non exsit file
is there is any way to check what is the non exist file ?
pawn Код:
stock CheckBan(ip[])
{
    new string[20];
    if(fexist("ban.cfg"))
    {
        new File: file = fopen("ban.cfg", io_read);
        while(fread(file, string))
        {
            if (strcmp(ip, string, true, strlen(ip)) == 0)
            {
                fclose(file);
                return 1;
            }
        }
        fclose(file);
    }
    return 0;
}
Reply


Messages In This Thread
Solved : Code / Server Stops when write - by Joe_Goro - 28.11.2013, 11:08
Re: How to do this ? - by xVIP3Rx - 28.11.2013, 11:20
Re: How to do this ? - by Konstantinos - 28.11.2013, 11:22
Re: How to do this ? - by Joe_Goro - 28.11.2013, 11:26
Re: How to do this ? - by Konstantinos - 28.11.2013, 11:29
Re: How to do this ? - by Joe_Goro - 28.11.2013, 11:37
Re: How to do this ? - by Konstantinos - 28.11.2013, 11:41
Re: How to do this ? - by Joe_Goro - 28.11.2013, 11:43
Re: How to do this ? - by Joe_Goro - 28.11.2013, 21:10

Forum Jump:


Users browsing this thread: 3 Guest(s)