28.06.2013, 07:13
Помогите пожалуйста, проверяю мод плагином crashdetect 4.9 и в паблике нашло вот это:
[09:30:23] [debug] Run time error 4: "Array index out of bounds"
[09:30:23] [debug] Accessing element at index 1 past array upper bound 0
[09:30:23] [debug] AMX backtrace:
[09:30:23] [debug] #0 000141f4 in public MzCheck () from Sa.amx
Вот паблик:
[09:30:23] [debug] Run time error 4: "Array index out of bounds"
[09:30:23] [debug] Accessing element at index 1 past array upper bound 0
[09:30:23] [debug] AMX backtrace:
[09:30:23] [debug] #0 000141f4 in public MzCheck () from Sa.amx
Вот паблик:
PHP код:
public MzCheck()
{
for(new i =0;i<sizeof(MZInfo);i++)
{
if(ZoneOnBattlem[i] == 1 && MZSafeTime[i] == 0)
{
ZoneTimerm[i] -=10;
if(ZoneTimerm[i] <=0)
{
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bZahvat] == 1)
{
BizzInfo[h][bMafia] = BizzInfo[h][bMafia];
SendFamilyMessage(BizzInfo[h][bMafia],COLOR_GREEN,"{40E0D0}Âàì óäàëîñü îòñòîÿòü ñâîé áèçíåñ");
SendFamilyMessage(MZInfo[i][mNapad],COLOR_RED,"{CD5C5C}Âàì íå óäàëîñü âçÿòü ïîä êîíòðîëü íîâûé áèçíåñ");
BizzInfo[h][bZahvat] = 0;
startwar = 0;
ZoneOnBattlem[i] =0;
GangZoneStopFlashForAll(zons);
OnPropUpdate();
}
}
}
for(new x =0;x<MAX_PLAYERS;x++)
{
if(PlayerToKvadrat(x,328.755706, 2412.644531, 448.755706, 2564.644531))
{
new factionm;
if(PlayerInfo[x][pLeader] !=0) factionm = PlayerInfo[x][pLeader];
else factionm = PlayerInfo[x][pMember];
OnmZONE[i][factionm] ++;
}
}
new asd;
for(new x =0;x<20;x++)
{
if(OnmZONE[i][x] > 0 && IsInAllowedM(x)) asd ++;
}
if(asd == 1)
{
for(new x =0;x<20;x++)
{
if(OnmZONE[i][x] > 0)
{
new zx,zl;
zx = x;
zl = i;
if(MZInfo[i][mFrakVlad] == x)
{
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bZahvat] == 1)
{
BizzInfo[h][bMafia] = BizzInfo[h][bMafia];
SendFamilyMessage(BizzInfo[h][bMafia],COLOR_RED,"{40E0D0}Âû îòñòîÿëè ñâîé áèçíåñ");
SendFamilyMessage(MZInfo[i][mNapad],COLOR_RED,"{CD5C5C}Âàì íå óäàëîñü çàâîåâàòü åù¸ îäèí áèçíåñ");
BizzInfo[h][bZahvat] = 0;
startwar = 0;
}
}
}
else
{
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bZahvat] == 1)
{
SendFamilyMessage(BizzInfo[h][bMafia],COLOR_RED,"{40E0D0}Âû ïîòåðÿëè êîíòðîëü íàä îäíèì èç ñâîèõ áèçíåñîâ");
SendFamilyMessage(MZInfo[i][mNapad],COLOR_LIGHTGREEN,"{CD5C5C}Âû çàâîåâàëè íîâûé áèçíåñ");
BizzInfo[h][bMafia] = MZInfo[i][mNapad];
BizzInfo[h][bZahvat] = 0;
startwar = 0;
}
}
}
ZoneOnBattlem[zl] =0;
MZInfo[zl][mNapad] = 0;
MZInfo[zl][mFrakVlad] = zx;
GangZoneStopFlashForAll(zons);
GangZoneHideForAll(zons);
GangZoneShowForAll(zons,COLOR_NEWS);
OnPropUpdate();
break;
}
}
}
}
}
for(new i =0;i<3;i++)
{
for(new z = 0;z<20;z++)
{
OnmZONE[i][z] =0;
}
}
}