memcpy error. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: memcpy error. (
/showthread.php?tid=611683)
memcpy error. -
Spenker - 09.07.2016
error 032: array index out of bounds (variable "Veh")
Код HTML:
new Veh[MAX_PLAYERS][9][i_Veh];
Код HTML:
memcpy(Veh[playerid][i], Veh[MAX_PLAYERS][9], 0, sizeof(Veh[][])*4, sizeof(Veh[][]));
Re: memcpy error. -
iKarim - 09.07.2016
PHP код:
memcpy(Veh[playerid][i], Veh[MAX_PLAYERS-1][8], 0, sizeof(Veh[][])*4, sizeof(Veh[][]));
or alternatively change the array size like that:
PHP код:
new Veh[MAX_PLAYERS+1][10][i_Veh];
any of those methods above will solve your problem, use only one of them.
Re: memcpy error. -
Spenker - 09.07.2016
Thank you.