SA-MP Forums Archive
[Ajuda] Porque da esses 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] Porque da esses erros? (/showthread.php?tid=457328)



Porque da esses erros? - Jonathan4i20 - 11.08.2013

Ei gente, por que q pra mim ñ compila o FS de carros > https://sampforum.blast.hk/showthread.php?tid=302442


da esses erros aki:

PHP код:
C:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(260) : error 047: array sizes do not match, or destination array is too small
C
:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(261) : error 047: array sizes do not match, or destination array is too small
C
:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(651) : error 021symbol already defined"strtok"
C:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(666) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
4 Errors




Re: Porque da esses erros? - focaximubh - 11.08.2013

Poste as linhas do erro.


Re: Porque da esses erros? - Jonathan4i20 - 11.08.2013

linha 260-261

PHP код:
    cmd strtok cmdtext idx ) ;
    
tmp strtok cmdtext idx ) ; 
linha 651 até a linha 666

PHP код:
{
    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



Re: Porque da esses erros? - focaximubh - 11.08.2013

Atualiza suas includes baixe o sa-mp server no site www.sa-mp.com


Re: Porque da esses erros? - Jonathan4i20 - 11.08.2013

mesmos erros


Re: Porque da esses erros? - PT - 11.08.2013

Tenta assim

pawn Код:
new cmd[128], tmp[128], idx;

cmd = strtok(cmdtext, idx);
cmd = strtok ( cmdtext , idx ) ;
tmp = strtok ( cmdtext , idx ) ;



//E depois, coloque no Final do GM:

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;
}



Re: Porque da esses erros? - Jonathan4i20 - 11.08.2013

deu esses erros aki amigo...

PHP код:
C:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(260) : warning 217loose indentation
C
:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(260) : error 047: array sizes do not match, or destination array is too small
C
:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(261) : error 047: array sizes do not match, or destination array is too small
C
:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(262) : error 047: array sizes do not match, or destination array is too small
C
:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(264) : warning 217loose indentation
C
:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(651) : error 021symbol already defined"strtok"
C:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(666) : error 047: array sizes do not match, or destination array is too small
C
:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(936) : error 021symbol already defined"strtok"
C:\Users\Jonathan\Downloads\concessionaria v2.0 final.pwn(950) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
7 Errors