SA-MP Forums Archive
[Ajuda] Erros Ao Compilar -BASICO - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Erros Ao Compilar -BASICO (/showthread.php?tid=307136)



[Ajuda] Erros Ao Compilar -BASICO - shadauer - 29.12.2011

Bom Dia.

Primeiramente Tava Dando Erros De Strtok , Puis
pawn Код:
#define strtok
Depois Comeзo Uns Errinho De TMP Puis
pawn Код:
#define tmp
Beleza, Ai Deu Isso:
pawn Код:
C:\BWE\gamemodes\BWE.pwn(2204) : error 001: expected token: "-identifier-", but found "["
C:\BWE\gamemodes\BWE.pwn(2207) : error 029: invalid expression, assumed zero
C:\BWE\gamemodes\BWE.pwn(2207) : error 035: argument type mismatch (argument 2)
C:\BWE\gamemodes\BWE.pwn(2207) : error 020: invalid symbol name ""
C:\BWE\gamemodes\BWE.pwn(2207) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
pawn Код:
LINHAS 2202 - 2207:
new File:temp;
new index = 0;
new tmp[256];
new modelid, Float:X, Float:Y, Float:Z, Float:ang, Cor1, Cor2;
temp = fopen("carros.txt", io_readwrite);
while(fread(temp, tmp, sizeof(tmp), false)) {
index = 0;
pawn Код:
LINHA 2202 - 2204
new File:temp;
new index = 0;
new tmp[256];



Re: [Ajuda] Erros Ao Compilar -BASICO - shadauer - 29.12.2011

a strtok ?


Re: [Ajuda] Erros Ao Compilar -BASICO - shadauer - 29.12.2011

ta mais puis #define strtok


Re: [Ajuda] Erros Ao Compilar -BASICO - ReDKiiL - 29.12.2011

pawn Код:
//Calback OnPlayerText

new tmp[128];


//fim do gm
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
 
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}



Re: [Ajuda] Erros Ao Compilar -BASICO - shadauer - 29.12.2011

Sу pioro , agora o pawno fecha ,.,..

@edit ,
Cйrto, Mas Os ERROS Continuaram


Re: [Ajuda] Erros Ao Compilar -BASICO - RebeloX - 29.12.2011

Esqueceu uma defeni ai nгo acha? coloca assim

pawn Код:
#define n00b "shadauer й muito noob, pois defeniu uma strtock"
Vocк tб doido? Tira essas defines e olha para a wiki do samp.

https://sampwiki.blast.hk/wiki/Strtok

BlueX'