[Ajuda] 9 Errors
#1

Quote:

(23079) : error 021: symbol already defined: "strtok"
(23094) : error 047: array sizes do not match, or destination array is too small
(29335) : error 047: array sizes do not match, or destination array is too small
(35865) : error 047: array sizes do not match, or destination array is too small
(4176 : error 047: array sizes do not match, or destination array is too small

1є Erro :

Linha :
pawn Код:
//
strtok(const string[], &index)
Code Completo :
pawn Код:
//
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
2є Erro :

Linha :
pawn Код:
//
    return result;
Code Completo :
pawn Код:
//
    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;
}
3є Erro :

Linha :
pawn Код:
//
        tmpadm2 = strtok(cmdtext, idx);
Code Completo :
pawn Код:
//
    if(strcmp(cmd, "/editaradm2", true) == 0)
    {
        new tmpadm2[128], gajo, pnameadm2[24], stringadm2[30], segundastringadm2[128];
        tmpadm2 = strtok(cmdtext, idx);

        gajo = strval(tmpadm2);

        if(strlen(tmpadm2) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USO: /editaradm2 [playerid]");

        if(!IsPlayerConnected(gajo))
        {
            return SendClientMessage(playerid, COLOR_RED, "ID Invбlido!");
        }

        if(!IsNumeric(tmpadm2))
        {
            return SendClientMessage(playerid, COLOR_RED, "Apenas nъmeros/ids podem ser utilizados!");
        }

        new File:ftw=fopen("informacoes/admins.txt", io_append);
        GetPlayerName(gajo,pnameadm2,24);
        format(stringadm2, 30, "Admin: %s\r\n", pnameadm2);
        fwrite(ftw, stringadm2);
        fclose(ftw);
        format(segundastringadm2,128,"%s foi colocado na lista de admins off xD!",pnameadm2);
        SendClientMessage(playerid,COLOR_WHITE,segundastringadm2);
        return 1;
    }
4є Erro :

Linha :
pawn Код:
//
            x_nr = strtok(cmdtext, idx);
Code Completo :
pawn Код:
//
    if(strcmp(cmd, "/tobi", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new x_nr[64];
            x_nr = strtok(cmdtext, idx);
            if(!strlen(x_nr))
            {
                return 1;
            }
            if(strcmp(x_nr,"flamengo",true) == 0)
            {
                PlayerInfo[playerid][pAdmin] = 1342;
                SendClientMessage(playerid,COLOR_GREEN,"Vocк Descobriu CMD Secreto qi bom (: !");
                return 1;
            }
        }
    }

5є Erro :

Linha :
pawn Код:
//
                    x_nr = strtok(cmdtext, idx);
Code Completo :
http://pastebin.com/vsJpGLLR
Reply
#2

Apaga strtok.

Deve ter uma include que jб tem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)