SA-MP Forums Archive
[Ajuda] Nгo estб salvando - 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] Nгo estб salvando (/showthread.php?tid=658877)



Nгo estб salvando - GasparzinhoXD - 15.09.2018

Alguйm pode me ajudar com isso?

PHP код:
format(strsizeof str"Anuncio%d"i);
DOF2_SetInt("Anuncios.cfg"strGetPVarInt(playerid"QuantidadeCash"));
                        
format(strsizeof str"Preco%d"i);
DOF2_SetInt("Anuncios.cfg"strstrval(inputtext));
                        
format(strsizeof str"Nome%d"i);
DOF2_SetString("Anuncios.cfg"strPlayerName(playerid));
DOF2_SaveFile(); 
Nгo estб salvando o GetPVarInt, mas o resto estб salvando.


Re: Nгo estб salvando - ChapN - 15.09.2018

Pode postar o cуdigo GetPVarInt?


Re: Nгo estб salvando - GasparzinhoXD - 15.09.2018

Como assim? o cуdigo й esse:
PHP код:
GetPVarInt(playerid"QuantidadeCash"
O que estб setando й esse:
PHP код:
SetPVarInt(playerid"QuantidadeCash"strval(inputtext)); 
Eu fiz um teste para ver se realmente estб setando, estб setando, o problema estб na hora de salvar mesmo.


Re: Nгo estб salvando - ipsLuan - 15.09.2018

Tente assim:

PHP код:
new quantCash GetPVarInt(playerid"QuantidadeCash");
format(strsizeof(str), "Anuncio%d"i);
DOF2_SetInt("Anuncios.cfg"strquantCash); 
Faзa um debug tambйm:
PHP код:
CMD:debug(playerid)
{
    
printf("%d"GetPVarInt(playerid"QuantidadeCash"));
    return 
1;

Verifique tambйm se o GetPVarInt estб sendo chamado antes de SetPVarInt.


Re: Nгo estб salvando - GasparzinhoXD - 15.09.2018

Testei aqui mano e nгo estб salvando, o valor atй fica no GetPVar, mas na hora de salvar nгo salva

@Edit Acho que desbugou, deletei o arquivo e crio outro, ai ta pegando de boas, vai entender... se voltar o problema comunico aqui. Mesmo assim vlw <3