SA-MP Forums Archive
Qual erro Aquie ? - 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: Qual erro Aquie ? (/showthread.php?tid=225084)



[RESOLVIDO]Qual erro Aquie ? - Peedro Felix - 13.02.2011

Aki os Erros :
PHP код:
C:\Users\ulisses-pc\Documents\Start Life\gamemodes\bpn10.pwn(15804) : error 021symbol already defined"strtok"
C:\Users\ulisses-pc\Documents\Start Life\gamemodes\bpn10.pwn(15819) : error 047: array sizes do not match, or destination array is too small
C
:\Users\ulisses-pc\Documents\Start Life\gamemodes\bpn10.pwn(18664) : warning 219local variable "mod" shadows a variable at a preceding level 

Locais Do Erro

PHP код:
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: Qual erro Aquie ? - Macintosh - 13.02.2011

Apague isto e compile


Re: Qual erro Aquie ? - [Ips]Guh - 13.02.2011

ou entao mude de strtok para strtok2
pawn Код:
strtok2(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: Qual erro Aquie ? - Peedro Felix - 13.02.2011

Valeu Lucas Apaguei e o Do Mod Sу Fiz Mudar para Mod2


Re: Qual erro Aquie ? - Macintosh - 13.02.2011

nada ^^