The DataBase Does Not Save ???

ahmedzead

  • Jr. Member
  • Posts: 50
The DataBase Does Not Save ???
« on November 20th, 2017, 11:04 AM »
Hi , My problem is the DataBase does not save any details of accounts and im already created tables Can any one Help???

!

  • Sr. Member
  • Don't feel shy while zooming on h*r... >>zeus#5155
  • Posts: 377
Re: The DataBase Does Not Save ???
« Reply #1, on November 20th, 2017, 12:43 PM »Last edited on November 20th, 2017, 12:48 PM
Wow the same problem happens with me too and developers told me this is a built-in bug means you can't save a database since 04rel release.

Follow these steps which was given to me by Stormeus.
Quote from Stormeus on November 20th, 2017, 11:04 AM
  • Reinstall your window.
  • Than install a fresh vcmp server.
  • And then try to use your script again.
If these steps don't solve your problem contact me in pm.

Discord: zeus#5155

Mohamed Boubekri

  • Sr. Member
  • In-Game Name:- We3da^
  • Posts: 265
After all this pain, peace will come brother.

Xmair

  • Wiki Contributor
  • Posts: 960
Re: The DataBase Does Not Save ???
« Reply #3, on November 21st, 2017, 10:21 AM »
Quote from zeus on November 20th, 2017, 12:43 PM
Wow the same problem happens with me too and developers told me this is a built-in bug means you can't save a database since 04rel release.

Follow these steps which was given to me by Stormeus.
Quote from Stormeus on November 20th, 2017, 11:04 AM
  • Reinstall your window.
  • Than install a fresh vcmp server.
  • And then try to use your script again.
If these steps don't solve your problem contact me in pm.
then*
also you forgot the step where you smash your head into your monitor in order for the script to work

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

ahmedzead

  • Jr. Member
  • Posts: 50
Re: The DataBase Does Not Save ???
« Reply #4, on November 22nd, 2017, 05:41 PM »Last edited on November 25th, 2017, 09:16 PM
Where is the bug in this Function ???
Code: [Select]
function Register( player, password, dbGlobal, time ){
  ::QuerySQL( dbGlobal, "INSERT INTO Accounts VALUES('" + player.Name + "', '" + player.Name.tolower() + "', '" + ::SHA256( password ) + "', 0, 0, 0, 0, 1, '" + player.IP + "')" );
Level = 1;
LastUsedIP = player.IP;
Logged = true;
::MessagePlayer( msg.S + "Successfully registered , Don't use this password in other servers.", player );

!

  • Sr. Member
  • Don't feel shy while zooming on h*r... >>zeus#5155
  • Posts: 377

Discord: zeus#5155

umar4911

  • Hero Member
  • Creating own server!
  • Posts: 518
Re: The DataBase Does Not Save ???
« Reply #6, on November 25th, 2017, 05:27 AM »
Quote from ahmedzead on November 22nd, 2017, 05:41 PM
Where is the bug in this Code ???
Code: [Select]
function Register( player, password, dbGlobal, time ){
  ::QuerySQL( dbGlobal, "INSERT INTO Accounts VALUES('" + player.Name + "', '" + player.Name.tolower() + "', '" + ::SHA256( password ) + "', 0, 0, 0, 0, 1, '" + player.IP + "')" );
Level = 1;
LastUsedIP = player.IP;
Logged = true;
::MessagePlayer( msg.S + "Successfully registered , Don't use this password in other servers.", player );
The problem is simple. The query is not complete. You send the data but in which column the data should be added.
Code: [Select]
QuerySQL(dbGlobal, "INSERT INTO Accounts (Name, LowerName, Password) VALUES ('"+player.Name+"', '"+player.Name.tolower()+"', '"+SHA256( password)+"') ");
This is an example to understand
I am gamer, programmer and hacker. Try to find me!
xD

Xmair

  • Wiki Contributor
  • Posts: 960
Re: The DataBase Does Not Save ???
« Reply #7, on November 25th, 2017, 07:30 AM »
Quote from umar4911 on November 25th, 2017, 05:27 AM
Quote from ahmedzead on November 22nd, 2017, 05:41 PM
Where is the bug in this Code ???
Code: [Select]
function Register( player, password, dbGlobal, time ){
  ::QuerySQL( dbGlobal, "INSERT INTO Accounts VALUES('" + player.Name + "', '" + player.Name.tolower() + "', '" + ::SHA256( password ) + "', 0, 0, 0, 0, 1, '" + player.IP + "')" );
Level = 1;
LastUsedIP = player.IP;
Logged = true;
::MessagePlayer( msg.S + "Successfully registered , Don't use this password in other servers.", player );
The problem is simple. The query is not complete. You send the data but in which column the data should be added.
Code: [Select]
QuerySQL(dbGlobal, "INSERT INTO Accounts (Name, LowerName, Password) VALUES ('"+player.Name+"', '"+player.Name.tolower()+"', '"+SHA256( password)+"') ");
This is an example to understand
Not essential.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD