21.05.2016, 08:48
So it seems like I have forgotten to add a value but still, the line isn't adding, and how can I make an Primary key in SQLite (I know Im quite noob into databases, I used file based till now)
Here is the function
Here is the function
pawn Код:
stock CreateTruckPoint(delivID, delivType ,delivName[], delivObj[], cashreward = 0, Float:posx = -1.0, Float:posy = -1.0, Float:posz = -1.0)
{
new query[128];
format(query, sizeof(query), "INSERT INTO `TruckPoints` (`DeliveryID`, `DeliveryType`, `DeliveryObjective`, `DeliveryName`, `CashReward`, `FinalPositionX`, `FinalPositionY`, `FinalPositionZ`) VALUES('%d', '%d', '%s', '%s', '%d', '%f', '%f', '%f')", delivID, delivType, delivObj, delivName, cashreward, posx, posy, posz);
db_query(truckpoints, query);
return 1;
}