SA-MP Forums Archive
problema variable - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: problema variable (/showthread.php?tid=369169)



problema variable - kn9w - 16.08.2012

(9067) : error 032: array index out of bounds (variable "HitmanCar")
1 Error.

Linea: 9067
Код:
	HitmanCar[5] = AddStaticVehicleEx(521,2510.8052,-965.2666,82.3111,92.4990,0,0,60000); //fcr-900 6
y asi lo tengo yo.

Код:
//Hitman Cars
    HitmanCar[0] = AddStaticVehicleEx(560,2534.9424,-945.2881,83.0756,28.7876,0,0,60000); //sultan 1
	HitmanCar[1] = AddStaticVehicleEx(560,2541.5994,-943.7125,83.1571,20.3020,0,0,60000); //sultan 2
	HitmanCar[2] = AddStaticVehicleEx(560,2549.5454,-942.1592,83.0323,21.3630,0,0,60000); //sultan 3
	HitmanCar[3] = AddStaticVehicleEx(558,2494.3416,-951.9447,82.2499,271.2060,0,0,60000); //uranus 4
	HitmanCar[4] = AddStaticVehicleEx(521,2520.9634,-977.0240,81.9459,85.5384,0,0,60000); //fcr-900 5
	HitmanCar[5] = AddStaticVehicleEx(521,2510.8052,-965.2666,82.3111,92.4990,0,0,60000); //fcr-900 6
lo agrege tomando como ejemplo el de gobierno, y agrege todo bien, y lo revise 10 veses y esta bien pero me tira ese error. alguna ayuda?


Respuesta: problema variable - Fluid016 - 16.08.2012

agrandale el array a la variable HitmanCar


Respuesta: problema variable - OTACON - 16.08.2012

pawn Код:
new HitmanCar[6];