[Ajuda] Converter INI para DINI
#1

Alguкm ai pode me ajudar a converter da include INI pra include DINI pf tentei mais ou menos procurei uns tuto ai mais nenhum explicava direito o que cada funзгo fazia os erro й pq eu n coverti

PHP код:
stock SaveVip(playerid)
{
    
GetPlayerName(playeridvNomesizeof(vNome));
    
format(Pasta,sizeof(Pasta),"VipPlayers/%s.ini"vNome);// DEFINE A PASTA E O NOME DO PLAYER
    
dini_Set(Pasta);// EDITA O %S(NOME).ini SE NAO TIVER CRIA, CRIA SOMENTE A PASTA %S(NOME).ini , VOCК TEM QUE CRIAR A PASTA VIPPLAYERS
    
dini_Int("Permissao"VipPlayer[playerid]);// SALVA A PERMISSAO DO PLAYER, SE NAO TIVER = 0, SE TIVER = 1
    
dini_IntSet();
    
dini_Remove();
}
stock LoadVip(playerid)
{
    
GetPlayerName(playeridvNomesizeof(vNome));
    
format(Pasta,sizeof(Pasta),"VipPlayers/%s.ini"vNome);//DEFINE A PASTA E O NOME ONDE VAI LER NOMEDOPLAYER.INI
    
dini_Open(Pasta);
    
VipPlayer[playerid] = DINI_ReadInt("Permissao");// VAI LER O ARQUIVO E VAI DEFINIR SE O PLAYER E VIP OU NAO 0  = NAO, 1 = SIM
    
dini_Remove();

Agora os erro:

PHP код:
C:\Projeto D.M\gamemodes\DM2.pwn(631) : warning 202number of arguments does not match definition
C
:\Projeto D.M\gamemodes\DM2.pwn(631) : warning 202number of arguments does not match definition
C
:\Projeto D.M\gamemodes\DM2.pwn(633) : warning 202number of arguments does not match definition
C
:\Projeto D.M\gamemodes\DM2.pwn(633) : warning 202number of arguments does not match definition
C
:\Projeto D.M\gamemodes\DM2.pwn(633) : warning 202number of arguments does not match definition
C
:\Projeto D.M\gamemodes\DM2.pwn(634) : warning 202number of arguments does not match definition
C
:\Projeto D.M\gamemodes\DM2.pwn(641) : error 017undefined symbol "dini_Open"
C:\Projeto D.M\gamemodes\DM2.pwn(642) : error 017undefined symbol "DINI_ReadInt"
C:\Projeto D.M\gamemodes\DM2.pwn(643) : warning 202number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
2 Errors

os erro tгo na parte dini_

pois n consegui converter .-.
Reply
#2

OBS:To criando um sistema VIP basico por isso ta com erros .-.
Reply
#3

UPPPP
Reply
#4

Nгo entendi muito bem como vocк quer o sistema de salvamento/carregamento.. fiz desta forma:

Код:
stock SaveVip( playerid ) 
{ 
    GetPlayerName( playerid, vNome, sizeof( vNome ));
    format( Pasta, sizeof( Pasta ),"VipPlayers/%s.ini", vNome );

    if( !fexist( Pasta ))
    {
        dini_Create( Pasta );
        dini_IntSet( Pasta, "Permissao", VipPlayer[ playerid ] );
    }
    else
    {
        dini_IntSet( Pasta, "Permissao", VipPlayer[ playerid ] );
    }
}

stock LoadVip( playerid )  
{ 
    GetPlayerName( playerid, vNome, sizeof( vNome )); 
    format( Pasta, sizeof( Pasta ),"VipPlayers/%s.ini", vNome );
    
    if( fexist( Pasta ))
    {
        VipPlayer[ playerid ] = dini_Int( Pasta, "Permissao" );
    }
    else
    {
        SaveVip( playerid );
    }
}
@Edit
Corrigi alguns detalhes que tinha esquecido.
Reply
#5

Opa vlw ai mano ajudou muito hein agora vou crira os comandos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)