SA-MP Forums Archive
[Ayuda] errores Tuning. - 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: [Ayuda] errores Tuning. (/showthread.php?tid=315066)



[Ayuda] errores Tuning. - Karim_Loyola - 01.02.2012

Buenas, puse el sistema de Guardado de Tuning de Digman en mi GM pero me tira estos errores:

Код:
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25447) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25448) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25531) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25542) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25565) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25566) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25572) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25573) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25580) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25581) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25588) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25589) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25595) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25596) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25602) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(25603) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(60065) : error 032: array index out of bounds (variable "VehiclesMod")
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\RealSecondLife.pwn(60070) : error 032: array index out of bounds (variable "VehiclesMod")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


18 Errors.
Que ni Joni pudo arreglarlo y por eso en su GM no se guardan los Tunings D:

Gracias!


Respuesta: [Ayuda] errores Tuning. - davidxxx - 01.02.2012

pasa la linea de alguno de esos errores y de la variable VehiclesMod y aceptame en el msn :3


Respuesta: [Ayuda] errores Tuning. - Karim_Loyola - 01.02.2012

Esto es la lнnea de un error:

pawn Код:
VehiclesMod[idx][5] = 0;
Y la variable:

pawn Код:
new VehiclesMod[MAX_VEHICLES][14];



Respuesta: [Ayuda] errores Tuning. - davidxxx - 01.02.2012

idx >= max_vehicles eso genera el error


Respuesta: [Ayuda] errores Tuning. - Karim_Loyola - 01.02.2012

Quote:
Originally Posted by davidxxx
Посмотреть сообщение
idx >= max_vehicles eso genera el error
їY quй tengo que hacer?


Respuesta: [Ayuda] errores Tuning. - davidxxx - 01.02.2012

pawn Код:
if(idx < MAX_VEHICLES){
    //accion
}



Respuesta: [Ayuda] errores Tuning. - Karim_Loyola - 02.02.2012

їCambiar esas funciones (errores) por eso?


Respuesta: [Ayuda] errores Tuning. - Jovanny - 02.02.2012

no dije nada


Respuesta: [Ayuda] errores Tuning. - TheChaoz - 02.02.2012

Tu problema por el codigo que expusiste es que el valor idx es demasiado grande, con el codigo que davidxxx deberias poder arreglar tu error.

como lo usas? simple:
pawn Код:
if(idx < MAX_VEHICLES)VehiclesMod[idx][5] = 0;
o bien:
pawn Код:
if(idx < MAX_VEHICLES){
    VehiclesMod[idx][5] = 0;
}
como a ti mas te guste.

Edit:

Quote:
Originally Posted by Jovanny
Посмотреть сообщение
no, david esta equivocado, cambia esto
pawn Код:
new VehiclesMod[MAX_VEHICLES][14];
por esto

pawn Код:
new VehiclesMod[MAX_VEHICLES][50];
en realidad eso no resolveria nada si la lina la tiene como el dijo, ya que el valor 5<14 por lo que no puede estar sobre-pasando el limite, mientras que idx es un valor variable y podria ser el causante.


Respuesta: [Ayuda] errores Tuning. - Karim_Loyola - 02.02.2012

A ver me confundo, por un lado Jovanny me dice uno y the_chaoz otro, lo ъnico que se es que el MAX_VEHICLES [14] una vez lo cambiй a 16 y nunca se guardaron los tunings