18.07.2013, 01:22
Solution: Change the <= to < in the loop.
Explanation:
Say MAX_PLAYERS is 10, player IDs range from 0 to 9, and <= means less than or equal to, meaning it will call it for ID 10, even though ID 10 can't exist. If you have this array:
Calling someArray[10] will cause an OOB error, as the max index is 9 (don't forget things start at 0).
Explanation:
Say MAX_PLAYERS is 10, player IDs range from 0 to 9, and <= means less than or equal to, meaning it will call it for ID 10, even though ID 10 can't exist. If you have this array:
pawn Код:
new someArray[MAX_PLAYERS];

