MySQL/SQLite warning
#5

Like this?
Still errors

Код:
stock CreatePlayerCar(playerid, mid, col1, col2)
{
    new Query[512], DBResult: idc;

    format(Query, sizeof(Query), "INSERT INTO CARS (MODELID) VALUES(%d)", mid);
    db_query(Database, Query);
    
	format(Query, sizeof(Query), "SELECT MAX(ID) FROM CARS");
    idc = db_query(Database, Query);//here


    format(Query, sizeof(Query), "UPDATE CARS SET FUEL = '40.0', X = '2159.5457', Y = '-2321.5134', Z = '15.1379', ANGLE = '0.0', COLOR1 = '%d', COLOR2 = '%d' WHERE ID = %i", col1, col2, idc);
    db_query(Database, Query);


    SendClientMessage(playerid, WHITE, "Kupili ste auto.");
    LoadPlayerCar(DBResult: idc); //here

    return true;
}
Reply


Messages In This Thread
MySQL/SQLite warning - by Danijel. - 02.03.2014, 17:49
Re: MySQL/SQLite warning - by Konstantinos - 02.03.2014, 17:54
Re: MySQL/SQLite warning - by Danijel. - 02.03.2014, 18:02
Re: MySQL/SQLite warning - by Konstantinos - 02.03.2014, 18:04
Re: MySQL/SQLite warning - by Danijel. - 02.03.2014, 18:09
Re: MySQL/SQLite warning - by Konstantinos - 02.03.2014, 18:15
Re: MySQL/SQLite warning - by Danijel. - 02.03.2014, 18:20
Re: MySQL/SQLite warning - by Konstantinos - 02.03.2014, 18:27
Re: MySQL/SQLite warning - by Danijel. - 02.03.2014, 18:33
Re: MySQL/SQLite warning - by Konstantinos - 02.03.2014, 18:41

Forum Jump:


Users browsing this thread: 1 Guest(s)