[Ajuda] invalid expression, assumed zero
#1

Aff to com um erro na hr de compilar meu GM e nao sei oque pode ser mano ;S

Obs. : O erro tava apontando na linha do stock strtok(const string[])

Linha do erro:
pawn Код:
SendClientMessage(i, COLOR_GRAD1,"Vocк foi solto por pagar sua divida com a sociedade");
            PlayerInfo[i][pJailed] = 0;
            ClearCrime(i);
            stock strtok(const string[])
{
Espero que me ajudem urgente!
Reply
#2

Tenta por isso no final do gm

pawn Код:
stock 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;
}
Reply
#3

O erro й proveniente do nesting de funзхes que vocк fez .



Nгo se deve colocar a definiзгo de uma funзгo dentro do corpo de outra funзгo:


pawn Код:
stock Funcao1()
{
    stock Funcao2()
    {
        return 1;
    }
    return 1;
}


Espero ter ajudado .
Reply
#4

PHP код:
#include a_samp


/// na sua respectivos CallBack
for(new 0GetMaxPlayers(); i++)
{
SendClientMessage(iCOLOR_GRAD1,"Vocк foi solto por pagar sua divida com a sociedade");
PlayerInfo[i][pJailed] = 0;
ClearCrime(i);
}


/// em qualquer lugar sua GM
stock 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;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)