Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: ahmedzead on Nov 20, 2017, 11:04 AM

Title: The DataBase Does Not Save ???
Post by: ahmedzead on Nov 20, 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???
Title: Re: The DataBase Does Not Save ???
Post by: ! on Nov 20, 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 Nov 20, 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.
Title: Re: The DataBase Does Not Save ???
Post by: Mohamed Boubekri on Nov 21, 2017, 07:31 AM
@zeus Hm I think the problem for Table @ahmedzead post your table here.
Title: Re: The DataBase Does Not Save ???
Post by: Xmair on Nov 21, 2017, 10:21 AM
Quote from: zeus on Nov 20, 2017, 12:43 PMWow 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 Nov 20, 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
Title: Re: The DataBase Does Not Save ???
Post by: ahmedzead on Nov 22, 2017, 05:41 PM
Where is the bug in this Function ???
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 );
Title: Re: The DataBase Does Not Save ???
Post by: ! on Nov 24, 2017, 12:26 PM
Quote from: ahmedzead on Nov 22, 2017, 05:41 PMWhere is the bug in this Code ???
Where is the code? ???
Title: Re: The DataBase Does Not Save ???
Post by: umar4911 on Nov 25, 2017, 05:27 AM
Quote from: ahmedzead on Nov 22, 2017, 05:41 PMWhere is the bug in this Code ???
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.
QuerySQL(dbGlobal, "INSERT INTO Accounts (Name, LowerName, Password) VALUES ('"+player.Name+"', '"+player.Name.tolower()+"', '"+SHA256( password)+"') ");This is an example to understand
Title: Re: The DataBase Does Not Save ???
Post by: Xmair on Nov 25, 2017, 07:30 AM
Quote from: umar4911 on Nov 25, 2017, 05:27 AM
Quote from: ahmedzead on Nov 22, 2017, 05:41 PMWhere is the bug in this Code ???
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.
QuerySQL(dbGlobal, "INSERT INTO Accounts (Name, LowerName, Password) VALUES ('"+player.Name+"', '"+player.Name.tolower()+"', '"+SHA256( password)+"') ");This is an example to understand
Not essential.