[Ajuda] Erro ao Copilar
#1

Galera to usando um sistema de ADM do meu Colega Lуs soque ta dano uns erros, Tipo coloquei ele no meu GM q estou criando de Corrida de Rua e os erros sгo os seguintes :
pawn Код:
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(91) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(105) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(123) : error 017: undefined symbol "IsNumeric"
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(133) : warning 217: loose indentation
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(160) : warning 217: loose indentation
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(160) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(160) : error 017: undefined symbol "IsNumeric"
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(160) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(160) : fatal error 107: too many error messages on one line

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


7 Errors.
Erro Linha 105
pawn Код:
return result;
Erro Linha 133
pawn Код:
new len = strlen(text[pos]);
Erro Linha 160
pawn Код:
stock IsNumeric(const string[])
Me ajudem por favor ^^
Reply
#2

strtok deve estar definido jб em alguma local no proprio script ou em alguma include, veja isto.
Reply
#3

pawn Код:
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(105) : error 017: undefined symbol "IsNumeric"
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(115) : warning 217: loose indentation
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(142) : warning 217: loose indentation
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(142) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(142) : error 017: undefined symbol "IsNumeric"
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(142) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(142) : 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.
Tirei o Strtok e deu nisso '-' se Precisar das linha peзa
Reply
#4

pawn Код:
stock IsNumeric(const string[])
{
    for (new i = 0, j = strlen(string); i < j; i++)
        if(string[i] > '9' || string[i] < '0') return 0;

    return 1;
}
Reply
#5

Meu sistema nгo usa strtok usa sscanf2, porque nгo pediu ajuda no prуprio tуpico? Tente colocar a stock que o Vini passou no seu GM, se nгo funcionar, poste os erros.

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
stock IsNumeric(const string[])
{
    for (new i = 0, j = strlen(string); i < j; i++)
        if(string[i] > '9' || string[i] < '0') return 0;

    return 1;
}
Reply
#6

Use a strtok que o vini mostrou acima:

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
stock IsNumeric(const string[])
{
    for (new i = 0, j = strlen(string); i < j; i++)
        if(string[i] > '9' || string[i] < '0') return 0;

    return 1;
}
Reply
#7

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
stock IsNumeric(const string[])
{
    for (new i = 0, j = strlen(string); i < j; i++)
        if(string[i] > '9' || string[i] < '0') return 0;

    return 1;
}
Deu os seguintes Erros :

pawn Код:
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(104) : warning 217: loose indentation
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(104) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(104) : error 017: undefined symbol "IsNumeric"
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(104) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\GM Novo\gamemodes\Untitled.pwn(104) : fatal error 107: too many error messages on one line

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


4 Errors.
Linha 104 Erro :
pawn Код:
stock IsNumeric(const string[])
Reply
#8

Poste a funзгo que a IsNumeric estб dentro, funзгo da linha 104. Poste a stock completa.
Reply
#9

pawn Код:
stock IsNumeric(const string[])
{
    for (new i = 0, j = strlen(string); i < j; i++)
        if(string[i] > '9' || string[i] < '0') return 0;

    return 1;
}
    new len = strlen(text[pos]);
    new count = 0;
    new name[MAX_PLAYER_NAME];
    for (new i = 0; i <MAX_PLAYERS; i++) {
        if (IsPlayerConnected(i)) {
            GetPlayerName(i, name, sizeof (name));
            if (strcmp(name, text[pos], true, len) == 0) {
                if (len == strlen(name)) {
                    return i;
                }
                else {
                    count++;
                    userid = i;
                }
            }
        }
    }
    if (count != 1) {
        if (playerid != INVALID_PLAYER_ID) {
            if (count){SendClientMessage(playerid, VERMELHO, "{FF1493}[ADMIN SYSTEM]{FF0000}  Vбrios jogadores encontrados, por favor, procure com mais especificaзгo.");}
            else{SendClientMessage(playerid, VERMELHO, "{FF1493}[ADMIN SYSTEM]{FF0000}  Nenhum jogador correspondente encontrado.");}

        userid = INVALID_PLAYER_ID;
    }
    return userid;
}

stock IsNumeric(const string[])
{
   for (new i = 0, j = strlen(string); i < j; i++){if (string[i] > '9' || string[i] < '0') return 0;}
    return 1;
}
Reply
#10

Quote:
Originally Posted by Joker_OutLock
Посмотреть сообщение
Use a strtok que o vini mostrou acima:
O que o vini mostro e uma stock nao uma strtok amigo...
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)