29.09.2013, 23:31
I have in my code, a system to copy info from a database to a variable for my vehicles. However, I am a total noob at SQLite (started learning today, yay me )..anyhow, I know how to write an integer, but how do I write a string?
I tried this:
but got this error:
The enum is like this:
While i'm making this thread, im also getting an error with this line
Im not sure what I did wrong in string :P
I tried this:
pawn Код:
new Field[ 20 ];
db_get_field_assoc(Result, "OWNER", Field, 30);
VehicleInfo[vehicleID][vOwner] = Field;
Код:
error 047: array sizes do not match, or destination array is too small
pawn Код:
enum vInfo
{
vFuel,
vOwner[MAX_PLAYER_NAME],
vModel,
vCol1,
vCol2,
vID,
Float:vSpawnX,
Float:vSpawnY,
Float:vSpawnZ,
Float:vSpawnA,
};
pawn Код:
format(Query, sizeof(Query), "SELECT * FROM `VEHICLES` WHERE `ID` = '%d' COLLATE NOCASE", DB_Escape(vehicleID));
Код:
error 035: argument type mismatch (argument 1)