Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Array index out of bounds

 
  • 0 Vote(s) - 0 Average
Pawn Array index out of bounds
Z3fRaN
Offline

Burgershot Member
Posts: 9
Threads: 5
Joined: Feb 2021
Reputation: 0
Location: Egypt
#1
2021-04-25, 02:09 AM
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;
}
Radical
Offline

Burgershot Member
Posts: 148
Threads: 21
Joined: Dec 2020
Reputation: 16
#2
2021-04-25, 10:00 AM (This post was last modified: 2021-04-25, 10:01 AM by Radical.)
PHP Code:
vehicle = CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, addsiren);

// >>>

vehicle = CreateVehicle(modelid, x, y, z, z_rotation, color1, color2, vrespawn_delay, vaddsiren); 
Z3fRaN
Offline

Burgershot Member
Posts: 9
Threads: 5
Joined: Feb 2021
Reputation: 0
Location: Egypt
#3
2021-04-25, 08:33 PM
Got it figured, thanks.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode