23.10.2014, 19:45
(
Последний раз редактировалось sensi; 23.10.2014 в 20:46.
)
Hello guys, i have one error and i don't see here is the problem.
Can you help me plz ?
Thx
error:
And my fonction:
Thanks for your help.
Can you help me plz ?
Thx
error:
Код:
#0 00042abc in public TextNom () from lsrp.amx [21:36:56] [debug] Run time error 4: "Array index out of bounds" [21:36:56] [debug] Accessing element at index 500 past array upper bound 499 [21:36:56] [debug] AMX backtrace: [21:36:56] [debug] #0 00042abc in public TextNom () from lsrp.amx [21:36:56] [debug] Run time error 4: "Array index out of bounds" [21:36:56] [debug] Accessing element at index 500 past array upper bound 499 [21:36:56] [debug] AMX backtrace:
PHP код:
public TextNom()
{
for(new i; i <= MAX_PLAYERS; i++)
{
for(new j; j <= MAX_PLAYERS; j++)
{
new string[256];
if(aDuty[j])
{
new IP[15];
new Float:Health;
GetPlayerHealth(i,Health);
new Float:Armor;
GetPlayerArmour(i,Armor);
GetPlayerIp(i, IP, sizeof(IP));
DeletePlayer3DTextLabel(j,PlayerText3D:Nom[j][i]);
format(string,sizeof(string),"%s (%d)\nVie: %0.0f\nArmure: %0.0f\nIP: %s",NameUnder(i),i,Health,Armor,IP);
Nom2[j][i] = CreatePlayer3DTextLabel(j,string,COLOR_WHITE,0.0,0.0,0.3,40.0,i);
}
else
{
DeletePlayer3DTextLabel(j,PlayerText3D:Nom2[j][i]);
format(string,sizeof(string),"Inconnu (%d)",PlayerInfo[i][pNumAleatoire]);
Nom[j][i] = CreatePlayer3DTextLabel(j,string,COLOR_WHITE,0.0,0.0,0.1,10.0,i);
}
}
}
return 1;
}