08.06.2015, 18:47
I am creating the script to create vehicle mysql, and create one command, with the next code mysql (All variables has been definided):
The problem is: Not create the vehicle.
The callback "CrearVehiculoConceMysql" is the next:
In the callback, asign the vehicle variable, and save with mysql:
Yes asigned all variables [In the old time, i am creating the code, in other method, and no problem], but now fails to save variables.
PHP код:
new Query[500];
format(Query, sizeof(Query),"INSERT INTO `vehiculos` (`PosX`, `PosY`, `PosZ`) VALUES ('%f', '%f', '%f')", X2, Y2, Z2);
mysql_tquery(Conecction, Query, "CrearVehiculoConceMysql", "ddd", playerid, dealerid, 2);
The callback "CrearVehiculoConceMysql" is the next:
PHP код:
forward CrearVehiculoConceMysql(playerid, dealerid, VehConceID);
PHP код:
public CrearVehiculoConceMysql(playerid, dealerid, VehConceID)
{
new id = -1;
VehicleIDMYSQL[id] = cache_insert_id();
id = VehicleIDMYSQL[id];
// ETC etc
return 1;
}