[Ajuda] ERRO "strtok"
#1

Oque pode ser isso ?

Procurei em diversos tуpico mais nгo achei nada que me ajude...

Код:
Error 021: symbol already defined: "strtok"
Error 047: array sizes do not match, or destination array is too small


2 Errors.
Linha do erro:

Код:
Local do erro:  {  //[COD TODO]
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;
}
Linha do erro:
Код:
return result; //[COD TODO]
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;
}

O ERRO PERSISTE NISSO AQUI:

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


Messages In This Thread
ERRO "strtok" - by davi54723 - 09.02.2013, 13:19
Re: ERRO "strtok" - by tonisantolia - 09.02.2013, 13:24
Re: ERRO "strtok" - by davi54723 - 09.02.2013, 13:35

Forum Jump:


Users browsing this thread: 1 Guest(s)