Quote:
Originally Posted by _GamerX
I using this
PHP Code:
ArrayList[MAXPLAYERS + 1] PlayerInfo;
for(int i = 1; i <= MaxClients; i++) PlayerInfo[i] = new ArrayList(5);
|
MAXPLAYERS is a constant value, so I do not see any purposes of creating an array with dynamic length.
Just create fixed-length array.
PHP Code:
ArrayList PlayerInfo[MAXPLAYERS + 1]; //Global variable
void OnPluginStart() //Or somewhere else
{
for(int i = 1; i <= MaxClients; i++)
{
PlayerInfo[i] = new ArrayList(5);
}
}