SA-MP Forums Archive
[Ajuda] Erro strtok !!! - 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] Erro strtok !!! (/showthread.php?tid=472063)



Erro strtok !!! - Catchorro - 26.10.2013

Eu copilei o meu gm e deu esse erro
Quote:

C:\Documents and Settings\Lanterna Negra\Desktop\Projeto\gamemodes\Projeto.pwn(296) : warning 203: symbol is never used: "strtok"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

Mais eu vi a linha e era a ultima q nem tinha LoL


Re: Erro strtok !!! - XxFaTaLxX - 26.10.2013

pawn Код:
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: Erro strtok !!! - andreasbleck - 26.10.2013

Procura por strtok e deleta oq achar, esse erro ta dizendo que o strtok estб definido mais nao ta sendo usado.


Re: Erro strtok !!! - Catchorro - 26.10.2013

Nao deu e nao deu '-'


Re: Erro strtok !!! - BielCOP - 26.10.2013

Isto nao й um erro amigo, faзa assim:

Abra o Pawno e dк CTRL+F, quando aparecer a caixa de dialogo, digite: strtok.

Ao achar a mesma, selecione todo o conteudo da strtok e delete a mesma!


Re: Erro strtok !!! - Catchorro - 26.10.2013

Olhe uma parte dele .. so q eu acho ...
PHP код:
public Crescimento(playerid)
{
    if(!
Info[playerid][Arara])
    {
        
KillTimer(Info[playerid][Timer]);
        return 
0;
    }
    if(!
Info[playerid][Racao] && Info[playerid][Grande] < 5)
    {
        
SendClientMessage(playeridBRANCO"{FF6600}Vocк nгo alimentou sua Arara e Ela Morreu!");
        
RemovePlayerAttachedObject(playerid0);
        
Info[playerid][Arara] = false;
        
Info[playerid][Grande] = 0;
        
KillTimer(Info[playerid][Timer]);
        return 
1;
    }
    new 
str[30];
    
Info[playerid][Grande]++;
    
Info[playerid][Racao] = false;
    
format(strsizeof str"{FF6600}Sua Arara Cresceu! (%d/5)"Info[playerid][Grande]);
    
SendClientMessage(playeridBRANCOstr);
    if(
Info[playerid][Grande] >= 5)
    {
        
SendClientMessage(playeridBRANCO"{FF6600}Sua Arara Estб Grande e Pronta para ser vendida, Para vender digite /VenderArara !");
        
KillTimer(Info[playerid][Timer]);
    }
    return 
1;

e tbm
PHP код:
    new nome[24], str[50];
    
GetPlayerName(playeridnome24);
    
format(strsizeof str"%s - Arara"nome);
    if(
dini_Isset("Araras.txt"str))
    {
        
Info[playerid][Arara] = bool:dini_Bool("Araras.txt"str);
        
format(strsizeof str"%s - Racao"nome);
        
Info[playerid][Racao] = bool:dini_Bool("Araras.txt"str);
        
format(strsizeof str"%s - Grande"nome);
        
Info[playerid][Grande] = dini_Int("Araras.txt"str);
        if(
Info[playerid][Arara])
        {
            
Info[playerid][Timer] = SetTimerEx("Crescimento"300000true"i"playerid);
            
SendClientMessage(playerid0xFFFF00AA"{FF6600}Alimente sua arara ou ela morrerб.");
        }
      }
    return 
1;




Re: Erro strtok !!! - andreasbleck - 26.10.2013

Cara, faz oq o Biel falou, se vc nao achar strtok no gm pode ser erro em alguma include, mais de qualquer jeito, isso й sу um warning, vc pode ignorar pq o script foi compilado certo.


Re: Erro strtok !!! - Catchorro - 26.10.2013

mais eu nao gosto de warning



Re: Erro strtok !!! - PT - 26.10.2013

Quote:
Originally Posted by andreasbleck
Посмотреть сообщение
Cara, faz oq o Biel falou, se vc nao achar strtok no gm pode ser erro em alguma include, mais de qualquer jeito, isso й sу um warning, vc pode ignorar pq o script foi compilado certo.
se tem warning e pq o code nao ta bem e й preciso corrigir isso e uma ma pratica cara...

Quote:
Originally Posted by Catchorro
Посмотреть сообщение
mais eu nao gosto de warning
qual linha que da o warning??


Re: Erro strtok !!! - Catchorro - 26.10.2013

o pt nao e nem uma linha '-'