SA-MP Forums Archive
[ajuda] 2 erros - 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] 2 erros (/showthread.php?tid=325310)



[ajuda] 2 erros - Panico622 - 12.03.2012

Код:
C:\Users\AsR\Servidores\FS\helpers.pwn(490) : error 021: symbol already defined: "strtok"
C:\Users\AsR\Servidores\FS\helpers.pwn(504) : error 047: array sizes do not match, or destination array is too small
Linhas:

Код:
489:    strtok(const string[], &index)
490: {
491:         	new length = strlen(string);
492:	    while ((index < length) && (string[index] <= ' '))
493:	    {
494:		    index++;
495:	    }
496:	    new offset = index;
497:     new result[20];
498:	    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
499:	    {
500:		    result[index - offset] = string[index];
501:		    index++;
502:	    }
503:	    result[index - offset] = EOS;
504:	    return result;
505: }
Ajuda?


Re: [ajuda] 2 erros - humildadeforever - 12.03.2012

Apaga isso aн porque jб tem uma, e se nгo tivesse acho que teria que aumentar o tamanho da new result ! Sу apagar...


Re: [ajuda] 2 erros - DouglasRodrigues - 12.03.2012

a strtok ja ta definida, apaga este codigo.


Re: [ajuda] 2 erros - Skun Fly - 12.03.2012

Na linha 504 й erro estб em result. Tira o result e experimenta em por 1 ou true
Tipo:

pawn Код:
return 1;
ou

pawn Код:
return true;



Re: [ajuda] 2 erros - humildadeforever - 12.03.2012

Quote:
Originally Posted by Douglas_FusioN
Посмотреть сообщение
pawn Код:
strock 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;
 }
To ate sem pawno aqui, mas acho que e assim.
strock ? й stock xD e o erro tб dizendo que jб tem, vai por mais ainda? OMG
Quote:
Originally Posted by Skun Fly
Посмотреть сообщение
Na linha 504 й erro estб em result. Tira o result e experimenta em por 1 ou true
Tipo:

pawn Код:
return 1;
ou

pawn Код:
return true;
Nгo faz isso /\ que vai... acontecer algo '-'. Nгo poe nгo, basta tirar stock pois jб foi definida, atй eu que nгo sou tгo boa em inglкs sei o que quer dizer, e em todo caso temos o ****** tradutor que nгo й aquilo que se diga "Nossa como o ****** tradutor й bom", mas quebra galho.
Traduзгo: erro 021: sнmbolo jб definido: "strtok"


Re: [ajuda] 2 erros - DouglasRodrigues - 12.03.2012

Eu li errado krl '-'


Re: [ajuda] 2 erros - Skun Fly - 12.03.2012

Quote:
Originally Posted by humildadeforever
Посмотреть сообщение
strock ? й stock xD e o erro tб dizendo que jб tem, vai por mais ainda? OMG


Nгo faz isso /\ que vai... acontecer algo '-'. Nгo poe nгo, basta tirar stock pois jб foi definida, atй eu que nгo sou tгo boa em inglкs sei o que quer dizer, e em todo caso temos o ****** tradutor que nгo й aquilo que se diga "Nossa como o ****** tradutor й bom", mas quebra galho.
Traduзгo: erro 021: sнmbolo jб definido: "strtok"
humm. tem razгo se tirar o stock acaba com o outro erro tambйm


Re: [ajuda] 2 erros - Panico622 - 12.03.2012

Vlw
humildadeforever
era sу apaga mesmo!


+1