SA-MP Forums Archive
Errors.. - 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: Errors.. (/showthread.php?tid=600236)



Errors.. - Vizi - 05.02.2016

I get this errors
Код:
(57292):error 032: array index out of bounds (variable "PlayerInfo")
(57293)error 032: array index out of bounds (variable "PlayerInfo")
(57294)error 032: array index out of bounds (variable "PlayerInfo")
(57295)error 032: array index out of bounds (variable "PlayerInfo")
Код:
(57292)PlayerInfo[MAX_PLAYERS][pJailTime] = minutes*60;
(57293)PlayerInfo[MAX_PLAYERS][pJailed] = 4;
(57294)format(PlayerInfo[MAX_PLAYERS][pPrisonReason], 64, "[OOC][PRISONACC] %s", reason);
(57295)format(PlayerInfo[MAX_PLAYERS][pPrisonedBy], 24, "%s", GetPlayerNameEx(playerid));



Re: Errors.. - amirm3hdi - 05.02.2016

No, don't use MAX_PLAYERS, use playerid instead....

For example if you want to jail player 10 you'll do:
Код:
PlayerInfo[10][pJailTime] = minutes*60;



Re: Errors.. - Vizi - 05.02.2016

Quote:
Originally Posted by amirm3hdi
Посмотреть сообщение
No, don't use MAX_PLAYERS, use playerid instead....

For example if you want to jail player 10 you'll do:
Код:
PlayerInfo[10][pJailTime] = minutes*60;
TNX , fixed.