Here is the code
case "deleteveh":
{
if ( player.Vehicle )
{
local v = player.Vehicle;
QuerySQL( MainDB, "DELETE FROM Cars WHERE ID='" + v.ID + "'" );
v.Delete();
MessagePlayer("Deleted vehicle successfull!y",player);
}
break;
}
// PS: The directory is right.
Then I use that, although the vehicle deleted, it'll appear when the server reloaded.
There is no error on the console.
try to replace to:
FreeSQLQuery(QuerySQL( MainDB, "DELETE FROM Cars WHERE ID='" + v.ID + "'" ));
Quote from: Ankris on Jul 08, 2015, 10:48 AMtry to replace to:
FreeSQLQuery(QuerySQL( MainDB, "DELETE FROM Cars WHERE ID='" + v.ID + "'" ));
lol?
Quote from: Ankris on Jul 08, 2015, 10:48 AMtry to replace to:
FreeSQLQuery(QuerySQL( MainDB, "DELETE FROM Cars WHERE ID='" + v.ID + "'" ));
"DELETE" query needn't free.
Try
QuerySQL( MainDB, "DELETE TABLE FROM Cars WHERE ID='" + v.ID + "'" );
That's why this (http://forum.vc-mp.org/?topic=420.0) thing was made people. So you can see why it fails. If the query was indeed the problem. Besides, why the quotes around a number? '32' have you ever seen numbers in quotes? I doubt that.
Thanks all.
solved.
Quote from: S.L.C on Jul 08, 2015, 01:52 PMThat's why this (http://forum.vc-mp.org/?topic=420.0) thing was made people. So you can see why it fails. If the query was indeed the problem. Besides, why the quotes around a number? '32' have you ever seen numbers in quotes? I doubt that.
WHY DID YOU ANSWER BEFORE ME??? I was the one noticing that and was just about to give out the reason but I saw that you already told him :(