new query[500];
format(query, sizeof(query), "UPDATE vehicles SET vType=%d,vFaction=%d,vModel=%d,vMod1=%d,vMod2=%d,vMod3=%d,vMod4=%d,vMod5=%d,vvMod6=%d,vMod7=%d,vMod8=%d,vMod9=%d,vMod10=%d,vMod11=%d,vMod12=%d,vMod13=%d,vLockStatus=%d,vPaintJob=%d,PosX='%f',vPosY='%f',vPosZ='%f',vPosR='%f',vColour1=%d,vColour2=%d,vFuel=%d WHERE DataID=%d",
Vehicle[id][vType],Vehicle[id][vFaction],Vehicle[id][vModel],Vehicle[id][vMod][0],Vehicle[id][vMod][1],Vehicle[id][vMod][2],Vehicle[id][vMod][3],Vehicle[id][vMod][4],Vehicle[id][vMod][5],Vehicle[id][vMod][6],Vehicle[id][vMod][7],Vehicle[id][vMod][8],Vehicle[id][vPos][9],Vehicle[id][vMod][10],Vehicle[id][vMod][11],
Vehicle[id][vMod][12],Vehicle[id][vLockStatus],Vehicle[id][vPaintJob],Vehicle[id][vPos][0],Vehicle[id][vPos][1],Vehicle[id][vPos][2],Vehicle[id][vPos][3],Vehicle[id][vColour][0],Vehicle[id][vColour][1],Fuel[Vehicle[id][vVehicleID]],id);
mysql_query(query);
C:\Users\Callum\Desktop\Script\gamemodes\Farrow.pwn(1965 -- 1966) : error 032: array index out of bounds (variable "Vehicle")
enum Vehicle_Variables
{
vType,
vFaction,
vVehicleID,
vModel,
Float:vPos[4],
vColour[2],
vMod[13],
vFuel,
Engine,
vLockStatus,
vPaintJob,
}
new Vehicle[MAX_VEHICLES][Vehicle_Variables];
your line is too long... Pawno can't get the whole line so he gets just Vehicle...
|
your line is too long... Pawno can't get the whole line so he gets just Vehicle...
|
Vehicle[id][vPos][9]//vPos is of size 4, so accessing [9] is not allowed.
Eh?
@OP Your accessing the vehicle array out of bounds. pawn Код:
|