• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Array index out of bounds
#1
trying to create server sided vehicles

Code:
enum vInfo

{

vehicletype,

Float:vx,

Float:vy,

Float:vz,

Float:rotation,

vcolor1,

vcolor2,

respawn_delay,

addsiren=0

}



new VehicleInfo[MAX_VEHICLES][vInfo];



stock CreateVehicleEx(modelid, Float:x, Float:y, Float:z, Float:z_rotation, color1, color2, vrespawn_delay, vaddsiren=0)

{

new vehicle;

vehicle = CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, addsiren);

VehicleInfo[vehicle][vehicletype] = modelid;

VehicleInfo[vehicle][vx] = x; -?Array index out of bounds at variable "vehicleinfo"

VehicleInfo[vehicle][vy] = y; -?Array index out of bounds at variable "vehicleinfo"

VehicleInfo[vehicle][vz] = z;?-?Array index out of bounds at variable "vehicleinfo"

VehicleInfo[vehicle][rotation] = z_rotation; -?Array index out of bounds at variable "vehicleinfo"

VehicleInfo[vehicle][vcolor1] = color1;?-?Array index out of bounds at variable "vehicleinfo"

VehicleInfo[vehicle][vcolor2] = color2;??-?Array index out of bounds at variable "vehicleinfo"

VehicleInfo[vehicle][respawn_delay] = vrespawn_delay; -?Array index out of bounds at variable "vehicleinfo"

VehicleInfo[vehicle][addsiren] = vaddsiren;?-?Array index out of bounds at variable "vehicleinfo"

return 1;

}
  Reply
#2
PHP Code:
vehicle CreateVehicle(vehicletypeFloat:xFloat:yFloat:zFloat:rotationcolor1color2respawn_delayaddsiren);

// >>>

vehicle CreateVehicle(modelidxyzz_rotationcolor1color2vrespawn_delayvaddsiren); 
  Reply
#3
Got it figured, thanks.
  Reply


Forum Jump: