[Ajuda] Warning em salvamento DOF2
#1

/eae galera to fazendo um sistema de salvamento de dados poderiam me ajudar com esses warnings ?

PHP Code:
C:\Users\Jefferson\Desktop\ProjectDayz\gamemodes\GM.pwn(2702) : warning 217loose indentation
C
:\Users\Jefferson\Desktop\ProjectDayz\gamemodes\GM.pwn(2878) : warning 204symbol is assigned a value that is never used"Balas"
C:\Users\Jefferson\Desktop\ProjectDayz\gamemodes\GM.pwn(2878) : warning 204symbol is assigned a value that is never used"Arma"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
3 Warnings

linhas

ґ
PHP Code:
    new file[155], aname[MAX_PLAYER_NAME], Arma[13], Balas[13], string[155];
    
GetPlayerName(playeridanamesizeof(aname));
    
format(filesizeof(file), "Contas/%.ini"aname);
    if(
DOF2_FileExists(file))
    {
    
DOF2_SetFloat(file"Vida"pInfo[playerid][vida]);
    for(new 
i013i++)
    {
        
format(stringsizeof(string), "Arma%d"i);
        
GetPlayerWeaponData(playeridiArma[i], Balas[i]);
        
format(stringsizeof(string), "Balas%d"i);
        
DOF2_SetInt(filestringBalas[i]);
      }
      
DOF2_SaveFile();
    } 
Reply
#2

Isso estб meio confuso
PHP Code:
format(stringsizeof(string), "Arma%d"i); // Nгo entendi o sentido disso.
GetPlayerWeaponData(playeridiArma[i], Balas[i]); 
format(stringsizeof(string), "Balas%d"i); 
DOF2_SetInt(filestringBalas[i]); 
Acho que o correto seria
PHP Code:
GetPlayerWeaponData(playeridiArma[i], Balas[i]); 
format(stringsizeof(string), "Arma%d"i);
DOF2_SetInt(filestringArma[i]);
format(stringsizeof(string), "Balas%d"i); 
DOF2_SetInt(filestringBalas[i]); 
Duvidas me avise.
Reply
#3

Quote:
Originally Posted by garotin
View Post
Isso estб meio confuso
PHP Code:
format(stringsizeof(string), "Arma%d"i); // Nгo entendi o sentido disso.
GetPlayerWeaponData(playeridiArma[i], Balas[i]); 
format(stringsizeof(string), "Balas%d"i); 
DOF2_SetInt(filestringBalas[i]); 
Acho que o correto seria
PHP Code:
GetPlayerWeaponData(playeridiArma[i], Balas[i]); 
format(stringsizeof(string), "Arma%d"i);
DOF2_SetInt(filestringArma[i]);
format(stringsizeof(string), "Balas%d"i); 
DOF2_SetInt(filestringBalas[i]); 
Duvidas me avise.
PHP Code:
C:\Users\Jefferson\Desktop\ProjectDayz\gamemodes\GM.pwn(2878) : warning 204symbol is assigned a value that is never used"Balas"
C:\Users\Jefferson\Desktop\ProjectDayz\gamemodes\GM.pwn(2878) : warning 204symbol is assigned a value that is never used"Arma"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Warnings

toda minha linha
PHP Code:
public OnPlayerDisconnect(playeridreason)  
{
    
//========= salvamento de vida // armas
    
new file[155], aname[MAX_PLAYER_NAME], Arma[13], Balas[13], string[155];
    
GetPlayerName(playeridanamesizeof(aname));
    
format(filesizeof(file), "Contas/%.ini"aname);
    if(
DOF2_FileExists(file))
    {
    
DOF2_SetFloat(file"Vida"pInfo[playerid][vida]);
    for(new 
i013i++)
    {
        
GetPlayerWeaponData(playeridiArma[i], Balas[i]);
        
format(stringsizeof(string), "Arma%d"i);
        
DOF2_SetInt(filestringArma[i]);
        
format(stringsizeof(string), "Balas%d"i);
        
DOF2_SetInt(filestringBalas[i]);
      }
      
DOF2_SaveFile();
    }
        return 
1;

Reply
#4

ALG AJUDA ! porfavor
Reply
#5

tente

PHP Code:
public OnPlayerDisconnect(playeridreason)
{
    new 
file[50], aname[MAX_PLAYER_NAME]; 
    
GetPlayerName(playeridanamesizeof(aname)); 
    
format(filesizeof(file), "Contas/%.ini"aname); 

    if(
DOF2_FileExists(file)) 
    { 
        
DOF2_SetFloat(file"Vida"pInfo[playerid][vida]); 
        
        new 
Arma[13], Balas[13], sArma[20], sBalas[20];
        for(new 
013i++)
        {
            
GetPlayerWeaponData(playeridiArma[i], Balas[i]);
            
            
format(sArmasizeof(sArma),"Arma%d"i);
            
DOF2_SetInt(filesArmaArma[i]);
            
            
format(sBalassizeof(sBalas),"Balas%d"i);
            
DOF2_SetInt(filesBalasBalas[i]);
        }
        
DOF2_SaveFile(); 
    }
    return 
1;

Reply
#6

Quote:
Originally Posted by PT
View Post
tente

PHP Code:
public OnPlayerDisconnect(playeridreason)
{
    new 
file[50], aname[MAX_PLAYER_NAME]; 
    
GetPlayerName(playeridanamesizeof(aname)); 
    
format(filesizeof(file), "Contas/%.ini"aname); 
    if(
DOF2_FileExists(file)) 
    { 
        
DOF2_SetFloat(file"Vida"pInfo[playerid][vida]); 
        
        new 
Arma[13], Balas[13], sArma[20], sBalas[20];
        for(new 
013i++)
        {
            
GetPlayerWeaponData(playeridiArma[i], Balas[i]);
            
            
format(sArmasizeof(sArma),"Arma%d"i);
            
DOF2_SetInt(filesArmaArma[i]);
            
            
format(sBalassizeof(sBalas),"Balas%d"i);
            
DOF2_SetInt(filesBalasBalas[i]);
        }
        
DOF2_SaveFile(); 
    }
    return 
1;

PHP Code:
C:\Users\Jefferson\Desktop\ProjectDayz\gamemodes\GM.pwn(2851) : warning 204symbol is assigned a value that is never used"Balas"
C:\Users\Jefferson\Desktop\ProjectDayz\gamemodes\GM.pwn(2851) : warning 204symbol is assigned a value that is never used"Arma"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

Reply
#7

Eu que fiz este cуdigo na minha vнdeo aula, porйm o cуdigo nгo й dessa forma que vocк publicou, Como o membro acima disse nгo tem sentido o cуdigo que vocк implementou!
Reply
#8

Quote:
Originally Posted by [BOPE]Seu._.Madruga
View Post
Eu que fiz este cуdigo na minha vнdeo aula, porйm o cуdigo nгo й dessa forma que vocк publicou, Como o membro acima disse nгo tem sentido o cуdigo que vocк implementou!
ss eu vi teu tutorial
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)