SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 16/07/2018, 06:48 PM   #1
ViictorDaay-
Gangsta
 
ViictorDaay-'s Avatar
 
Join Date: Apr 2012
Location: Rio de Janeiro
Posts: 800
Reputation: 23
Angry Save

o SalvarDados(); não está funcionando dentro do loop, apenas funciona quando o ID é playerid.
Alguem sabe o motivo ou a solução?

OBS 1:

Descobri que está salvando o dinheiro, mas não está salvando as outras variáveis..

pawn Code:
for(new i = 0; i < MAX_PLAYERS; i++) SalvarDados(i);

stock SalvarDados(playerid)
{

    //if(pStats[playerid][pLogado] == false) return 1;
    pStats[playerid][pDinheiro] = GetPlayerMoney(playerid);
    new Query[350];
    mysql_format(IDConexao, Query, sizeof(Query), "UPDATE `Contas` SET `Nome`='%s', `Level`=%d, `Admin`=%d, `Skin`=%d, `Matou`=%d, `Morreu`=%d, `Dinheiro`=%d WHERE `ID`=%d",
    pStats[playerid][pNome],
    pStats[playerid][pLevel],
    pStats[playerid][pAdmin],
    pStats[playerid][pSkin],
    pStats[playerid][pMatou],
    pStats[playerid][pMorreu],
    pStats[playerid][pDinheiro],
    pStats[playerid][pID]);
   
    mysql_tquery(IDConexao, Query, "DadosSalvos","d", playerid);
     
     
    pStats[playerid][pLevel] = 0;
    pStats[playerid][pAdmin] = 0;
    pStats[playerid][pMatou] = 0;
    pStats[playerid][pMorreu] = 0;
    pStats[playerid][pDinheiro] = 0;
    pStats[playerid][pLogado] = false;

    return 1;
}
ViictorDaay- is offline   Reply With Quote
Old 16/07/2018, 10:15 PM   #2
Cauezin
Huge Clucker
 
Cauezin's Avatar
 
Join Date: Feb 2018
Location: Brasil - Rio de Janeiro
Posts: 352
Reputation: 12
Default Re: Save

Você tem que puxar elas neh , só vai salvar o dinheiro , por que você só salvou o dinheiro ;-

PHP Code:
pStats[playerid][pDinheiro] = GetPlayerMoney(playerid); 
__________________
the last person you want to be.
Cauezin is offline   Reply With Quote
Old 17/07/2018, 01:45 AM   #3
ViictorDaay-
Gangsta
 
ViictorDaay-'s Avatar
 
Join Date: Apr 2012
Location: Rio de Janeiro
Posts: 800
Reputation: 23
Default Re: Save

Quote:
Originally Posted by Cauezin View Post
Você tem que puxar elas neh , só vai salvar o dinheiro , por que você só salvou o dinheiro ;-

PHP Code:
pStats[playerid][pDinheiro] = GetPlayerMoney(playerid); 
Puxar elas como se elas já são variáveis globais?
ViictorDaay- is offline   Reply With Quote
Old 17/07/2018, 01:48 AM   #4
Cauezin
Huge Clucker
 
Cauezin's Avatar
 
Join Date: Feb 2018
Location: Brasil - Rio de Janeiro
Posts: 352
Reputation: 12
Default Re: Save

Manda o "DadosSalvos" e sua mysql_log
__________________
the last person you want to be.
Cauezin is offline   Reply With Quote
Old 17/07/2018, 02:38 AM   #5
ViictorDaay-
Gangsta
 
ViictorDaay-'s Avatar
 
Join Date: Apr 2012
Location: Rio de Janeiro
Posts: 800
Reputation: 23
Default Re: Save

Quote:
Originally Posted by Cauezin View Post
Manda o "DadosSalvos" e sua mysql_log
O DadosSalvos é apenas um debug no cmd

mysql_log:
PHP Code:

[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance
[23:33:53] [ERRORCCallback::Execute invalid AMX instance 
ViictorDaay- is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[save error] my backpack save system Donggyu Scripting Help 0 09/06/2016 05:39 PM
Save/Loadcar and Save/load name color Acerbis Scripting Help 1 29/06/2014 03:29 PM
How do i add save kills and save deaths to my admin script? HayZatic Help Archive 2 09/07/2011 11:13 PM
guys i need help how to save money in this script i created a file but it wont save Artix Help Archive 5 30/05/2011 09:03 PM
I Made a save command that AddStaticVehicle saves. But how to save the colors? RyDeR` Help Archive 2 04/08/2009 09:20 PM


All times are GMT. The time now is 07:52 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.