[AJUDA]Erro ao Compilar
#1

Peзo a ajuda de vocкs para resolver esse erros no compilar.
Erros
pawn Код:
Compilando KichnerBeta.pwn...
C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : error 017: undefined symbol "PLAYERLIST_authed"
C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : warning 215: expression has no effect
C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : error 001: expected token: ";", but found "]"

C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : error 029: invalid expression, assumed zero
C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : fatal error 107: too many error messages on one line

Compilation aborted.
Compilation aborted.Pawn compiler 3.2.3664             Copyright (c) 1997-2006, ITB CompuPhase
Linha
pawn Код:
if (PLAYERLIST_authed[playerid] == 1)
Reply
#2

Quote:
Originally Posted by Leo Nikov
Peзo a ajuda de vocкs para resolver esse erros no compilar.
Erros
pawn Код:
Compilando KichnerBeta.pwn...
C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : error 017: undefined symbol "PLAYERLIST_authed"
C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : warning 215: expression has no effect
C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : error 001: expected token: ";", but found "]"

C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : error 029: invalid expression, assumed zero
C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : fatal error 107: too many error messages on one line

Compilation aborted.
Compilation aborted.Pawn compiler 3.2.3664             Copyright (c) 1997-2006, ITB CompuPhase
Linha
pawn Код:
if (PLAYERLIST_authed[playerid] == 1)
Tenta :

pawn Код:
if (PLAYERLIST_authed[playerid] == 1);
Reply
#3

Quote:
Originally Posted by TheGarfield
Quote:
Originally Posted by Leo Nikov
Peзo a ajuda de vocкs para resolver esse erros no compilar.
Erros
pawn Код:
Compilando KichnerBeta.pwn...
C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : error 017: undefined symbol "PLAYERLIST_authed"
C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : warning 215: expression has no effect
C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : error 001: expected token: ";", but found "]"

C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : error 029: invalid expression, assumed zero
C:\Users\Leonardo\Documents\Server\KichnerBeta.pwn(63) : fatal error 107: too many error messages on one line

Compilation aborted.
Compilation aborted.Pawn compiler 3.2.3664             Copyright (c) 1997-2006, ITB CompuPhase
Linha
pawn Код:
if (PLAYERLIST_authed[playerid] == 1)
Tenta :

pawn Код:
if (PLAYERLIST_authed[playerid] == 1);
nгo adianto nгo resolveu nen um erro e nem acrescentou nem um erro ta tudo a mesma coisa.
Reply
#4

Bota mais algumas linhas ...
Reply
#5

Quote:
Originally Posted by TheGarfield
Bota mais algumas linhas ...
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{

  {
  if (PLAYERLIST_authed[playerid] == 1);
  {
    // Was loggedin, so save the data!
    udb_setAccState(PlayerName(playerid),GetPlayerMoney(playerid));
    new Float:health;
    Presos[playerid] = 0;
    Procurados[playerid] = 0;
    GetPlayerHealth(playerid, health);
    udb_setHealth(PlayerName(playerid), health);
    udb_setGasoline(PlayerName(playerid), Petrol[playerid]);
    udb_setProf(PlayerName(playerid), Profissao[playerid]);
  }
  return 1;
}

  new PlayerName[MAX_PLAYER_NAME];
  new string[56];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));

  switch(reason)
  {
    case 0: format(string, sizeof(string), "%s saiu do servidor. (Problema de conexгo)", PlayerName);
    case 1: format(string, sizeof(string), "%s saiu do servidor. (Conta prуpria)", PlayerName);
    case 2: format(string, sizeof(string), "%s saiu do servidor. (Kickado/Banido)", PlayerName);
  }
  SendClientMessageToAll(Cor_Azul,string);
  return 1;
}
Reply
#6

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    if (PLAYERLIST_authed[playerid] == 1)
    {
        // Was loggedin, so save the data!
        udb_setAccState(PlayerName(playerid),GetPlayerMoney(playerid));
        new Float:health;
        Presos[playerid] = 0;
        Procurados[playerid] = 0;
            GetPlayerHealth(playerid, health);
        udb_setHealth(PlayerName(playerid), health);
        udb_setGasoline(PlayerName(playerid), Petrol[playerid]);
        udb_setProf(PlayerName(playerid), Profissao[playerid]);
    }
    return 1;
}
Reply
#7

Quote:
Originally Posted by russooooo
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    if (PLAYERLIST_authed[playerid] == 1)
    {
        // Was loggedin, so save the data!
        udb_setAccState(PlayerName(playerid),GetPlayerMoney(playerid));
        new Float:health;
        Presos[playerid] = 0;
        Procurados[playerid] = 0;
            GetPlayerHealth(playerid, health);
        udb_setHealth(PlayerName(playerid), health);
        udb_setGasoline(PlayerName(playerid), Petrol[playerid]);
        udb_setProf(PlayerName(playerid), Profissao[playerid]);
    }
    return 1;
}
pawn Код:
Compilando KichnerBeta.pwn...
C:\Users\Leonardo\Documents\Server\Server\pawno\include\dini.inc(102) : error 033: array must be indexed (variable "DINI_fcopytextfile")
C:\Users\Leonardo\Documents\Server\Server\pawno\include\dini.inc(251) : error 079: inconsistent return types (array & non-array)
C:\Users\Leonardo\Documents\Server\Server\pawno\include\dini.inc(253) : error 079: inconsistent return types (array & non-array)
C:\Users\Leonardo\Documents\Server\Server\pawno\include\dini.inc(257) : error 079: inconsistent return types (array & non-array)

C:\Users\Leonardo\Documents\Server\Server\pawno\include\dini.inc(267) : error 079: inconsistent return types (array & non-array)

C:\Users\Leonardo\Documents\Server\Server\pawno\include\dutils.inc(22) : warning 225: unreachable code
C:\Users\Leonardo\Documents\Server\Server\pawno\include\dutils.inc(28) : error 029: invalid expression, assumed zero
C:\Users\Leonardo\Documents\Server\Server\pawno\include\dutils.inc(28) : error 017: undefined symbol "isNumeric"
C:\Users\Leonardo\Documents\Server\Server\pawno\include\dutils.inc(28) : error 029: invalid expression, assumed zero
C:\Users\Leonardo\Documents\Server\Server\pawno\include\dutils.inc(28) : fatal error 107: too many error messages on one line

Compilation aborted.
Compilation aborted.Pawn compiler 3.2.3664             Copyright (c) 1997-2006, ITB CompuPhase


9 Errors.
Dini
pawn Код:
if (DINI_fcopytextfile(tmpres,filename)) {
        return fremove(tmpres);
    }
    return false;
}


stock dini_IntSet(filename[],key[],value) {
  new valuestring[DINI_MAX_STRING];
  format(valuestring,DINI_MAX_STRING,"%d",value);
  return dini_Set(filename,key,valuestring);
}

stock dini_Int(filename[],key[]) {
  return strval(dini_Get(filename,key));
}

stock dini_FloatSet(filename[],key[],Float:value) {
  new valuestring[DINI_MAX_STRING];
  format(valuestring,DINI_MAX_STRING,"%f",value);
  return dini_Set(filename,key,valuestring);
}

stock Float:dini_Float(filename[],key[]) {
  return floatstr(dini_Get(filename,key));
}

stock dini_Bool(filename[],key[]) {
  return strval(dini_Get(filename,key));
}

stock dini_BoolSet(filename[],key[],value) {
    if (value) {
        return dini_Set(filename,key,"1");
    }
    return dini_Set(filename,key,"0");
}

stock dini_Unset(filename[],key[]) {
    // If we have no key, it can't be set
    // we also have no chance to unset the key, if all together is bigger then the max string
    new key_length = strlen(key);
    if (key_length==0 || key_length+2>DINI_MAX_STRING) return false;
   
    new File:fohnd, File:fwhnd;
    new tmpres[DINI_MAX_STRING];
   
    // Let's remove the old *.part file if there was one.
    format(tmpres,DINI_MAX_STRING,"%s.part",filename);
    fremove(tmpres);
   
    // We'll open the source file.
    fohnd=fopen(filename,io_read);
    if (!fohnd) return false;
   
    fwhnd=fopen(tmpres,io_write);
    if (!fwhnd) {
        // we can't open the second file for writing, so .. let's close the open one and exit.
        fclose(fohnd);
        return false;
    }
   
    while (fread(fohnd,tmpres)) {
        if (
            tmpres[key_length]=='='
            && !strcmp(tmpres, key, true, key_length)  
        ) {
                // We've got what needs to be removed!
        } else {
            DINI_StripNewLine(tmpres);
            fwrite(fwhnd,tmpres);
            fwrite(fwhnd,"\r\n");
        }
    }
   
    fclose(fohnd);
    fclose(fwhnd);

    format(tmpres,DINI_MAX_STRING,"%s.part",filename);
    if (DINI_fcopytextfile(tmpres,filename)) {
        return fremove(tmpres);
    }
    return false;
}

stock dini_Get(filename[],key[]) {
    new tmpres[DINI_MAX_STRING];
   
    new key_length = strlen(key);
    if (key_length==0 || key_length+2>DINI_MAX_STRING) return tmpres;
   
    new File:fohnd;
    fohnd=fopen(filename,io_read);
    if (!fohnd) return tmpres;
   
    while (fread(fohnd,tmpres)) {
        if (
            tmpres[key_length]=='='
            && !strcmp(tmpres, key, true, key_length)  
        ) {
            /* We've got what we need */
            DINI_StripNewLine(tmpres);
            strmid(tmpres, tmpres, key_length + 1, strlen(tmpres), DINI_MAX_STRING);
            fclose(fohnd);
            return tmpres;
        }
    }
    fclose(fohnd);
    return tmpres;
}


stock dini_Isset(filename[],key[]) {
    new key_length = strlen(key);
    if (key_length==0 || key_length+2>DINI_MAX_STRING) return false;
   
    new File:fohnd;
    fohnd=fopen(filename,io_read);
    if (!fohnd) return false;
   
    new tmpres[DINI_MAX_STRING];
    while (fread(fohnd,tmpres)) {
        if (
                tmpres[key_length]=='='
            && !strcmp(tmpres, key, true, key_length)  
        ) {
            // We've got what we need
            fclose(fohnd);
            return true;
        }
    }
    fclose(fohnd);
    return false;
}



  stock DINI_StripNewLine(string[]) {
    new len = strlen(string);
    if (string[0]==0) return ;
    if ((string[len - 1] == '\n') || (string[len - 1] == '\r')) {
        string[len - 1] = 0;
        if (string[0]==0) return ;
        if ((string[len - 2] == '\n') || (string[len - 2] == '\r')) string[len - 2] = 0;
    }
}

stock DINI_fcopytextfile(oldname[],newname[]) {
    new File:ohnd,File:nhnd;
    if (!fexist(oldname)) return false;
    ohnd=fopen(oldname,io_read);
    if (!ohnd) return false;
    nhnd=fopen(newname,io_write);
    if (!nhnd) {
        fclose(ohnd);
        return false;
    }
    new tmpres[DINI_MAX_STRING];
    while (fread(ohnd,tmpres)) {
        DINI_StripNewLine(tmpres);
        format(tmpres,sizeof(tmpres),"%s\r\n",tmpres);
        fwrite(nhnd,tmpres);
    }
    fclose(ohnd);
    fclose(nhnd);
    return true;
Dutils
pawn Код:
new PRIVATE_Last_Money[MAX_PLAYERS];

/*
 * First version released by mike, this one created by DracoBlue
 * Has also a fix to use "-" and "+" in the beginning of the number.
 */

stock isNumeric(const string[]) {
Reply
#8

Da maneira que passei deve funcionar direito, o undefined de 'authed' nгo sei quк й porque nгo tens nada implementado no script. Entгo deveria ser new PLAYERLIST_authed[MAX_PLAYERS]; e depois usar PLAYERLIST_authed = 1 no login e 0 no logout etc. Essa 'string' com nome 'string' й porque hб uma variбvel global ou no mesmo lugar igual. Ex: new string[128], string[128].
Reply
#9

Quote:
Originally Posted by russooooo
Da maneira que passei deve funcionar direito, o undefined de 'authed' nгo sei quк й porque nгo tens nada implementado no script. Entгo deveria ser new PLAYERLIST_authed[MAX_PLAYERS]; e depois usar PLAYERLIST_authed = 1 no login e 0 no logout etc. Essa 'string' com nome 'string' й porque hб uma variбvel global ou no mesmo lugar igual. Ex: new string[128], string[128].
sorry tinha postado os erros errados agora arrumei olha la
Reply
#10

Isso estб uma confusгo do caraзas, esses erros sгo relacionados a outra parte do script. Se isso й desse cуdigo que aн postaste й problema com os returns do Dini etc, nгo sei para que й que metem essa porcaria dentro do gamemode.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)