SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 10/09/2019, 07:06 PM   #1
iDark107
Little Clucker
 
iDark107's Avatar
 
Join Date: Sep 2019
Posts: 21
Reputation: 0
Question Banco de dados MySQL

Boa tarde!!

Venho tendo um problema com meu GM quanto a criação de contas no banco de dados MySQL. Aparentemente o problema está na forma pela qual estou criando as tabelas!
Eu sempre crio a tabela com as informações: Nome, Registro, Senha, Email, Skin, UltimaSenha, HorasVIP. Porém se tento adicionar o restante das informações, ao logar no servidor e se registrar, a conta não é registrada!
Não sei se o problema é a ordem que devo posicionar os itens na tabela ou algo assim! Pois outra pessoa havia instalado esse sistema de MySQL em meu GM e funcionava perfeitamente, porém agora que troque de banco de dados, estou com este problema ao criar as tabelas!

Deixarei o código de criação das contas:

Code:
    if(dialogid == 94)
    {
        
        if(response)
        {
            
            if(!strlen(inputtext))
            {
                
                ShowPlayerDialog(playerid, 94, DIALOG_STYLE_INPUT, "Registro - {1E90FF}Cidade {FFD700}Moderna {FFFFFF}(2/2)", "Digite seu endereço de e-mail para concluir seu registro!", "Registrar", "Voltar");
                SendClientMessage(playerid, COLOR_RED, "| ERRO | Digite seu endereço de e-mail!");
                return 1;
            }
            ContaCriada[playerid] = 1;
            //udb_Create(Nomep[playerid], pPassword[playerid]);
            psalvax[playerid] = 0;
            psalvay[playerid] = 0;
            psalvaz[playerid] = 0;
            upsalvax[playerid] = -89.8384;
            upsalvay[playerid] = 1224.4636;
            upsalvaz[playerid] = 19.7422;
            /*dUserSetFLOAT(Nomep[playerid]).("Pos X",psalvax[playerid]);
            dUserSetFLOAT(Nomep[playerid]).("Pos Y",psalvay[playerid]);
            dUserSetFLOAT(Nomep[playerid]).("Pos Z",psalvaz[playerid]);
            dUserSetFLOAT(Nomep[playerid]).("Ultima Pos X",upsalvax[playerid]);
            dUserSetFLOAT(Nomep[playerid]).("Ultima Pos Y",upsalvay[playerid]);
            dUserSetFLOAT(Nomep[playerid]).("Ultima Pos Z",upsalvaz[playerid]);
            dUserSetINT(Nomep[playerid]).("Skin", GetPlayerSkin(playerid));*/
            intsalvo[playerid] = 0;
            SetPlayerHealth(playerid, 99.0);
            SetPlayerMoneyEx(playerid, 0);
            Nivel[playerid] = 0;
            //dUserSetINT(Nomep[playerid]).("Interior",intsalvo[playerid]);
            Gasolina[playerid] = 20;
            Creditos[playerid] = 0;
            Fichas[playerid] = 0;
            Profissao[playerid] = 1;
            Notebook[playerid] = 0;
            gps[playerid] = 0;
            mp3[playerid] = 0;
            Exp[playerid] = 0;
            Vip[playerid] = 3;
            mudounumero[playerid] = 0;
            new Hora, Minuto, Segundo, Dia, Mes, Ano;
            getdate(Ano, Mes, Dia);
            gettime(Hora, Minuto, Segundo);
            format(SS, sizeof(SS), "%02d/%02d/%04d às %02d:%02d:%02d", Dia, Mes, Ano, Hora, Minuto, Segundo);

            /*'Registro','Online','Nivel','Bancox','Profissao','Gasolina','Creditos','CreditosCelular','Fichas','Notebook','Exp','Jetpack','Luzes','SemParar','PortaArmas','Gps','MP3','MudouNumero','AIDS','Preso',
            'HabNautica','HabTerrestre','HabAerea','HabArmas','HabHVG','HabHVA','Procurado','Skin','Interior','NumeroCelular','Cocaina','Heroina','PassagemLV','PassagemLS','PassagemSF','PassagemLC','VeiculosCriados','Velocimetrox','RelogioUP','PegoNoRadar',
            'TituloEleitor','TemRendaExtra','Vida','Colete','MinutosUP','SegundosUP','Luta','Tatuagem','Dinamites','GalaoDeGasolina','CapaCelular','BateriaCelular','CartaoDeCredito','AntiVirus','Bebado','Oculos','Arara','AraraComida','Taser','Capacete',
            'Bazuca','MunicaoBazuca','Despertador','iPod','Bone','LoginsCassino','ChatDivulgar','Distancia','Contrabandeada','Cash','HDespertador','MudouNick','Saudacao','SaudacaoAtiva','UltimaSenha','Email'
            */



            query[0] = EOS;
            format(query, sizeof(query), "INSERT INTO contas(Nome,Registro,Senha,Email,Skin,UltimaSenha,HorasVIP,Nivel,Bancox) VALUES ('%s', '%s','%s','%s','%d','%s','%s','%s','%s')", Nomep[playerid], SS,pPassword[playerid],inputtext,GetPlayerSkin(playerid),inputtext);
            mysql_tquery(Conexao, query);


            SendClientMessage(playerid, COLOR_GREEN, "| INFO | Conta registrada com sucesso, por favor, logue-se!");
            //ShowRegisterOrLoginDialog(playerid, 1);
            SelectTextDraw(playerid, 0x1E90FFFF); 
            return 1;
        }
        else
        {
            

            SelectTextDraw(playerid, 0x1E90FFFF); 
            //ShowRegisterOrLoginDialog(playerid, 2);
            return 1;
        }
    }
iDark107 is offline   Reply With Quote
Old 10/09/2019, 09:10 PM   #2
Felipe_Freeze
Huge Clucker
 
Felipe_Freeze's Avatar
 
Join Date: Dec 2011
Posts: 467
Reputation: 36
Default Re: Banco de dados MySQL

Olha na pasta logs -> plugins, se tem algum erro no mysql
__________________

DEVELOPER
Brasil

Ruby on Rails
Felipe_Freeze is offline   Reply With Quote
Old 10/09/2019, 09:55 PM   #3
iDark107
Little Clucker
 
iDark107's Avatar
 
Join Date: Sep 2019
Posts: 21
Reputation: 0
Default Re: Banco de dados MySQL

Está carregando normalmente:

Code:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team

[17:56:20] 
[17:56:20] Server Plugins
[17:56:20] --------------
[17:56:20]  Loading plugin: sscanf
[17:56:20] 

[17:56:20]  ===============================

[17:56:20]       sscanf plugin loaded.     

[17:56:20]          Version:  2.8.2        

[17:56:20]    (c) 2012 Alex "******" Cole  

[17:56:20]  ===============================

[17:56:20]   Loaded.
[17:56:20]  Loading plugin: pawncmd
[17:56:20] Pawn.CMD plugin v3.1.4 by urShadow loaded
[17:56:20]   Loaded.
[17:56:20]  Loading plugin: streamer
[17:56:20] 

*** Streamer Plugin v2.9.3 by Incognito loaded ***

[17:56:20]   Loaded.
[17:56:20]  Loading plugin: mysql
[17:56:20]  >> plugin.mysql: R41-4 successfully loaded.
[17:56:20]   Loaded.
[17:56:20]  Loaded 4 plugins.

[17:56:20] 
[17:56:20] Filterscripts
[17:56:20] ---------------
[17:56:20]   Loading filterscript 'bancof.amx'...
[17:56:20]   Loaded 1 filterscripts.

[17:56:20]  
[17:56:20]  
[17:56:20]  
[17:56:20]  ======================================= 
[17:56:20]  |                                     | 
[17:56:20]  |        YSI version 4.00.0001        | 
[17:56:20]  |        By Alex "******" Cole        | 
[17:56:20]  |                                     | 
[17:56:20]  ======================================= 
[17:56:20]  
[17:56:26] | INFO | Conectado ao banco de dados com sucesso!

[17:56:27] | INFO | 255 casas e 0 veículos carregados com sucesso!

[17:56:27] | INFO | 95 empresas carregadas com sucesso!

[17:56:27] | INFO | 0 clãs carregados com sucesso!

[17:56:27] | INFO | 7 bases carregadas com sucesso!

[17:56:27] | INFO | 1 SEs carregados com sucesso!

[17:56:27] | INFO | 1 balões carregados com sucesso!

[17:56:27] | INFO | Gamemode carregado com sucesso!

[17:56:27] Number of vehicle models: 88
[17:56:27] [connection] incoming connection: 127.0.0.1:52289 id: 0
[17:56:27] [npc:join] Gael has joined the server (0:127.0.0.1)
iDark107 is offline   Reply With Quote
Old 10/09/2019, 10:31 PM   #4
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 483
Reputation: 16
Default Re: Banco de dados MySQL

Ele quer o log do mysql. Qualquer erro será mostrado lá.

Logs/Plugins/mysql
NWDMadara is offline   Reply With Quote
Old 11/09/2019, 04:08 AM   #5
iDark107
Little Clucker
 
iDark107's Avatar
 
Join Date: Sep 2019
Posts: 21
Reputation: 0
Default Re: Banco de dados MySQL

Aqui está:

https://pastebin.com/mkiiLC0T
iDark107 is offline   Reply With Quote
Old 11/09/2019, 04:52 AM   #6
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 483
Reputation: 16
Default Re: Banco de dados MySQL

Exclua o arquivo, faça o procedimento do registro e mande os erros. Dessa você obterá somente os erros relacionados ao registro.
NWDMadara is offline   Reply With Quote
Old 11/09/2019, 06:01 PM   #7
iDark107
Little Clucker
 
iDark107's Avatar
 
Join Date: Sep 2019
Posts: 21
Reputation: 0
Default Re: Banco de dados MySQL

Aqui está:
Code:
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'ID' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: value '' is not a number
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: value '' is not a number
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: value '' is not a number
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: value '' is not a number
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Trabalhou' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'MostrarVIP' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'SaudacaoAtiva' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name: field 'Saudacao' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Profissao' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Gasolina' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Creditos' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'CreditosCelular' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Fichas' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Notebook' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Exp' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Jetpack' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'SemParar' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'PortaArmas' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Gps' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'MP3' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'MudouNumero' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'AIDS' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Preso' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'HabNautica' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'HabTerrestre' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'HabAerea' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'SemParar' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'HabArmas' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'HabHVG' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'HabHVA' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Procurado' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'NumeroCelular' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Cocaina' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Maconha' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Heroina' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'HabArmas' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'PassagemLV' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'PassagemLS' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'PassagemSF' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'PassagemLC' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'VeiculosCriados' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'RelogioUP' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'PegoNoRadar' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'TituloEleitor' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'TemRendaExtra' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Dinamites' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'PlanoDeSaude' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'GalaoDeGasolina' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Celular' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'CapaCelular' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'BateriaCelular' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'CartaoDeCredito' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'AntiVirus' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Bebado' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Oculos' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Arara' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'AraraComida' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Taser' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Capacete' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Bazuca' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'MunicaoBazuca' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Despertador' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'iPod' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Bone' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'LoginsCassino' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'ChatDivulgar' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'SaldoModificado' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Distancia' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Contrabandeada' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Cash' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Assaltando' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'NaoVerGlobal' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Mnick' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'RaceWins' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Online' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Interior' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Interior' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Matou' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Morreu' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_float: field 'PosX' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_float: field 'PosY' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_float: field 'PosZ' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Avisos' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'VezesEntrou' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_float: field 'UltimaPosX' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_float: field 'UltimaPosY' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_float: field 'UltimaPosZ' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_float: field 'Fome' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_float: field 'Sede' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_float: field 'Sono' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'MinutosUP' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'MinutosUP' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'SegundosUP' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'SegundosUP' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name: field 'HDespertador' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_float: field 'Vida' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_float: field 'Colete' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Luta' not found
[09/11/19 16:51:01] [ERROR] cache_get_value_name_int: field 'Tatuagem' not found
[09/11/19 16:51:02] [ERROR] cache_get_value_name: field 'Armas' not found
[09/11/19 16:51:10] [ERROR] cache_get_value_name: field 'Armas' not found
[09/11/19 16:51:16] [ERROR] error #1054 while executing query "UPDATE contas SET Nome='teste', Nivel='0', Bancox='0', Online='31',Profissao='1',Gasolina='20',Creditos='0',CreditosCelular='0',Fichas='0',Notebook='0',Exp='1',Jetpack='0',Gps='0',MP3='0',MudouNumero='0',AIDS='0',Preso='0',HabNautica='0',HabTerrestre='0',HabAerea='0',HabArmas='0',HabHVG='0',HabHVA='0',Procurado='0',NumeroCelular='0',Cocaina='0',Maconha='0',Heroina='0',PassagemLV='0',PassagemLS='0',PassagemSF='0',PassagemLC='0',VeiculosCriados='1',RelogioUP='0',PegoNoRadar='0',TituloEleitor='0',Dinamites='0',PlanoDeSaude='0',GalaoDeGasolina='0',Celular='0',CapaCelular='0',BateriaCelular='0',CartaoDeCredito='0',Bebado='0',AntiVirus='0',Arara='0',AraraComida='0',Taser='0',Capacete='1',Bazuca='0',MunicaoBazuca='0',Despertador='0',iPod='0',LoginsCassino='0',ChatDivulgar='1',Distancia='0',Contrabandeada='0',Cash='0',Assaltando='0',MinutosUP='5',SegundosUP='47',HDespertador=',00,00',NaoVerGlobal='0',  Mnick='0',  RaceWins='0', Setado='0',  Avisos='0', JaSuspendeu='0', AraraNome='', Interior='0',Matou='0',Morreu='0',VezesEntrou='2',Fome='100.000000',Sede='100.000000',Sono='100.000000' WHERE ID=0": Unknown column 'ID' in 'where clause'
[09/11/19 16:51:16] [ERROR] error #1054 while executing query "UPDATE contas SET Skin='0', Oculos='0', Bone='0' WHERE ID=0": Unknown column 'ID' in 'where clause'
[09/11/19 16:51:16] [ERROR] error #1054 while executing query "UPDATE contas SET Vida='99.000000'  WHERE ID=0": Unknown column 'ID' in 'where clause'
[09/11/19 16:51:16] [ERROR] error #1054 while executing query "UPDATE contas SET Colete='0.000000'  WHERE ID=0": Unknown column 'ID' in 'where clause'
[09/11/19 16:51:16] [ERROR] error #1054 while executing query "UPDATE contas SET `UltimaPosX`='1076.009765', `UltimaPosY`='-1786.676025', `UltimaPosZ`='13.650215' WHERE ID=0": Unknown column 'ID' in 'where clause'
[09/11/19 16:51:17] [ERROR] error #1054 while executing query "UPDATE contas SET Armas=',00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, ' WHERE ID=0": Unknown column 'ID' in 'where clause'
iDark107 is offline   Reply With Quote
Old 11/09/2019, 08:13 PM   #8
Ever_SH
Gangsta
 
Ever_SH's Avatar
 
Join Date: Sep 2012
Location: RS
Posts: 553
Reputation: 19
Default Re: Banco de dados MySQL

De acordo com as logs, as colunas não estão sendo encontradas. De uma olhada, talvez pode ser pela questão das letras maiúsculas.

Obs: Recomendo que crie todas as colunas com letras minusculas.
Ever_SH is online now   Reply With Quote
Old 11/09/2019, 10:33 PM   #9
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 483
Reputation: 16
Default Re: Banco de dados MySQL

A tabela e as colunas em que os dados serão inseridos não deveriam estar em aspas simples?


`contas`ao invés de contas
`Nome` ao invés de Nome

Sendo algo opcional ou não, você pode tentar. É assim que eu uso e da certo.

'Registro', 'Online', 'Nivel', 'Bancox'

A mesma coisa disso.

'' = Valores das colunas
`` = Colunas
NWDMadara is offline   Reply With Quote
Old 12/09/2019, 06:23 PM   #10
iDark107
Little Clucker
 
iDark107's Avatar
 
Join Date: Sep 2019
Posts: 21
Reputation: 0
Default Re: Banco de dados MySQL

Olá, já tentei realizar o que vocês falaram, porém anda está surtindo efeito! É aquilo que eu disse, eu usava outro banco de dados e funcionava perfeitamente (porém foi outra pessoa que realizou a instalação disso) e agora que eu mudei de banco de dados, apareceu este erro.

Abaixo deixarei a LOG do MySQL.. Não tenho nem ideia do quer fazer, pois se eu coloco as informações (Nome,Registro,Senha,Email,Skin,UltimaSenha,HorasV IP,Nivel,Bancox) o registro acontece normalmente, mas se adiciono as outras coisas na tabela, acontece o erro da conta não se registrar!

Será que o erro está aqui no GM?:
Code:
            query[0] = EOS;
            format(query, sizeof(query), "INSERT INTO contas(Nome,Registro,Senha,Email,Skin,UltimaSenha,HorasVIP,Nivel,Bancox) VALUES ('%s', '%s','%s','%s','%d','%s','%s','%s','%s')", Nomep[playerid], SS,pPassword[playerid],inputtext,GetPlayerSkin(playerid),inputtext);
            mysql_tquery(Conexao, query);
E aqui segue o LOG:

Code:
[09/12/19 17:20:41] [ERROR] error #1364 while executing query "INSERT INTO contas(Nome,Registro,Senha,Email,Skin,UltimaSenha,HorasVIP,Nivel,Bancox) VALUES ('iDark0', '12/09/2019 às 17:20:40','123456','emmanuel17hot@outlook.com','0','emmanuel17hot@outlook.com','','','')": Field 'id' doesn't have a default value
[09/12/19 17:20:48] [ERROR] error #1054 while executing query "UPDATE contas SET Nome='iDark0', Nivel='0', Bancox='0', Online='23',Profissao='1',Gasolina='20',Creditos='0',CreditosCelular='0',Fichas='0',Notebook='0',Exp='0',Jetpack='0',Gps='0',MP3='0',MudouNumero='0',AIDS='0',Preso='0',HabNautica='0',HabTerrestre='0',HabAerea='0',HabArmas='0',HabHVG='0',HabHVA='0',Procurado='0',NumeroCelular='0',Cocaina='0',Maconha='0',Heroina='0',PassagemLV='0',PassagemLS='0',PassagemSF='0',PassagemLC='0',VeiculosCriados='1',RelogioUP='0',PegoNoRadar='0',TituloEleitor='0',Dinamites='0',PlanoDeSaude='0',GalaoDeGasolina='0',Celular='0',CapaCelular='0',BateriaCelular='0',CartaoDeCredito='0',Bebado='0',AntiVirus='0',Arara='0',AraraComida='0',Taser='0',Capacete='0',Bazuca='0',MunicaoBazuca='0',Despertador='0',iPod='0',LoginsCassino='0',ChatDivulgar='1',Distancia='0',Contrabandeada='0',Cash='0',Assaltando='0',MinutosUP='11',SegundosUP='60',HDespertador=',00,00',NaoVerGlobal='0',  Mnick='0',  RaceWins='0', Setado='0',  Avisos='0', JaSuspendeu='0', AraraNome='', Interior='0',Matou='0',Morreu='0',VezesEntrou='0',Fome='0.000000',Sede='0.000000',Sono='0.000000' WHERE ID=0": Unknown column 'Online' in 'field list'
[09/12/19 17:20:48] [ERROR] error #1054 while executing query "UPDATE contas SET Skin='0', Oculos='0', Bone='0' WHERE ID=0": Unknown column 'Oculos' in 'field list'
[09/12/19 17:20:48] [ERROR] error #1054 while executing query "UPDATE contas SET Vida='1.000000'  WHERE ID=0": Unknown column 'Vida' in 'field list'
[09/12/19 17:20:48] [ERROR] error #1054 while executing query "UPDATE contas SET Colete='0.000000'  WHERE ID=0": Unknown column 'Colete' in 'field list'
[09/12/19 17:20:49] [ERROR] error #1054 while executing query "UPDATE contas SET `UltimaPosX`='0.000000', `UltimaPosY`='0.000000', `UltimaPosZ`='0.000000' WHERE ID=0": Unknown column 'UltimaPosX' in 'field list'
[09/12/19 17:20:49] [ERROR] error #1054 while executing query "UPDATE contas SET Armas=',00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, ' WHERE ID=0": Unknown column 'Armas' in 'field list'
__________________
iDark107 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
[Ajuda] MySQL - Banco De Dados DeYmonD Português/Portuguese 8 27/01/2019 09:37 PM
Não consigo conectar com banco de dados MySQL Diego54 Português/Portuguese 3 03/02/2018 10:30 PM
Não consigo conectar com banco de dados MySQL Diego54 Scripting Help 3 03/02/2018 07:20 PM
[Ajuda] Conectar banco de dados mysql igorcruz Português/Portuguese 2 02/02/2015 04:49 PM
[Ajuda] Conectar banco de dados mysql maikons Português/Portuguese 5 04/01/2015 01:39 PM


All times are GMT. The time now is 04:50 PM.


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