[Ajuda]erros na compilaзao
#1

¬¬

pawn Код:
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;
}
Код:
C:\Documents and Settings\SAMP-SERVER\Desktop\ccar.pwn(156) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\SAMP-SERVER\Desktop\ccar.pwn(171) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

Certeza que sгo essas as linhas?

pawn Код:
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;
}
Isso fica fora das publics, lб em baixo. E ve se jб tem uma igual a essa.
Reply
#3

PHP код:
error 021symbol already defined"strtok" Sнmbolo ja definido 
ou seja, apague essa
Reply
#4

CTRL + F em seu gamemode e coloque na linha strtok(const string[], &index)

Apague a funзгo

pawn Код:
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;
}
Reply
#5

Isso й muito comum acontecer, apague-o e fica o problema resolvido!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)