19.05.2017, 21:42
Приветствую форумчан, подскажите в одном вопросе.
Компилятор обнаружил рекурсивный код
Конкретная строка на которую ругается
Компилятор обнаружил рекурсивный код
PHP Code:
foreach(new i: Player)
{
if(GetPVarInt(i,"BoneStol")-1 == idx)
{
SendClientMessage(i,0x4B00B0AA,string);
DeletePVar(i, "BoneStol_");
if(IsPlayerNearBone(i) != idx) ExitBone(i);
}
}
Конкретная строка на которую ругается
PHP Code:
if(IsPlayerNearBone(i) != idx) ExitBone(i);
PHP Code:
stock ExitBone(playerid)
{
new null[2] = 0;
if(GetPVarInt(playerid,"BoneStol_") && BoneInfo[GetPVarInt(playerid,"BoneStol")-1][GameStart] <= 0)
{
PTEMP[playerid][pCash]+=BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Bet];
BoneInfo[GetPVarInt(playerid,"BoneStol")-1][bBank]-=BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Bet];
}
foreach(new i: Player)
{
if(GetPVarInt(i,"BoneStol") == GetPVarInt(playerid,"BoneStol") && i != playerid && GetPVarInt(i,"BoneStol_") == 1) null[0]++;
if(GetPVarInt(i,"BoneStol") == GetPVarInt(playerid,"BoneStol") && i != playerid && GetPVarInt(i,"BoneStol_") > 1) null[1]++;
}
if(null[0] == 0 && null[1] > 0) ShowItog(GetPVarInt(playerid,"BoneStol")-1);
if(BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Crupie] == playerid) BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Crupie] = INVALID_PLAYER_ID;
for(new i; i != 4; i++) TextDrawHideForPlayer(playerid,Bone[i]), PlayerTextDrawHide(playerid,PlayerBone[playerid][i]);
for(new i_ = 0; i_ != 5; i_++) if(BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Gamer][i_] == playerid) BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Gamer][i_] = INVALID_PLAYER_ID;
UpdateBone(GetPVarInt(playerid,"BoneStol")-1);
DeletePVar(playerid,"BoneStol");
DeletePVar(playerid,"BoneStol_");
CancelSelectTextDraw(playerid);
return true;
}