[ajuda]oque ha de errado ?
#10

Quote:
Originally Posted by Ricop522
Посмотреть сообщение
Ricop522

Deu erro na include.
na primeira linha :S

pawn Код:
#include <a_samp>

/*
native CriarLog(const File[]);
native EscreverLog(const File[], string[]);
native DeletarLog(const File[]);
native LerLog(const File[]);
native LogExistir(const File[]);
*/



#define LogExistir fexist

stock CriarLog(const File[])
{
    if(fexist(File))
    {
        printf("Utilize EscreverLog(\"arquivo\", \"Mensagem\"); para escrever em um log existente.");
        return 0;
    }
    new File:Arquivo = fopen(File, io_write);
    fclose(Arquivo);
    return 1;
}

stock EscreverLog(const File[], string[])
{
    if(!fexist(File))
    {
        printf("Utilize CriarLog(\"arquivo\"); para criar o Log e escrever nele.");
        return 0;
    }
    new celulas[ 300 ];
    new a, m, d, h, mi, s;
    getdate(a, m, d);
    gettime(h,mi,s);
    format(celulas, sizeof(celulas), "(%02d/%02d/%d)[%02d:%02d:%02d] %s\r\n",d,m,a,h,mi,s, string);
    new File:Arquivo = fopen(File, io_append);
    fwrite(Arquivo, celulas);
    fclose(Arquivo);
    return 1;
}

stock DeletarLog(const File[])
{
    if(!fexist(File))
    {
        printf("Esse arquivo nгo existe, utilize CriarLog(\"arquivo\"");
        return 0;
    }
    fremove(File);
    return 1;
}

stock LerLog(const File[])
{
    if(!fexist(File))
    {
        printf("Esse arquivo nгo existe, utilize CriarLog(\"arquivo\"");
        return 0;
    }
    new string[100];
    new File:Arquivo = fopen(File, io_read);
    while(fread(Arquivo, string))
    {
        printf("[ %s ] %s", File, string);
        return 1;
    }
    fclose(Arquivo);
    return 1;
}
o error ta bem na primeira linha 1
Mais oque ta errado ?

este error;

pawn Код:
C:\Users\2248\Desktop\Samp 3e\pawno\include\Logs.inc(1) : error 010: invalid function or declaration
Reply


Messages In This Thread
[ajuda]oque ha de errado ? - by lyllrasta - 15.04.2012, 01:04
Re: [ajuda]oque ha de errado ? - by zSuYaNw - 15.04.2012, 01:10
Re: [ajuda]oque ha de errado ? - by rjjj - 15.04.2012, 01:10
Re: [ajuda]oque ha de errado ? - by lyllrasta - 15.04.2012, 01:15
Re: [ajuda]oque ha de errado ? - by lyllrasta - 15.04.2012, 01:17
Re: [ajuda]oque ha de errado ? - by @Riichard - 15.04.2012, 01:18
Re: [ajuda]oque ha de errado ? - by Ricop522 - 15.04.2012, 01:19
Re: [ajuda]oque ha de errado ? - by lyllrasta - 15.04.2012, 01:20
Re: [ajuda]oque ha de errado ? - by BreakDriFT - 15.04.2012, 01:21
Re: [ajuda]oque ha de errado ? - by lyllrasta - 15.04.2012, 01:41

Forum Jump:


Users browsing this thread: 1 Guest(s)