Egorka22838
Ученик
if(strcmp(cmd, "/leaders", true) == 0)
{
new file = ini_openFile("gamefiles/log/leaders.ini");
ini_getString(file,"MARYA",pLeaders[0]);
ini_getString(file,"FBI",pLeaders[1]);
new ttextt[32];
if(IsPlayerConnected(GetPlayerID(pLeaders[0])))
{
ttextt = "[{22ff00}Online{F2EEF0}]";
}
else
{
ttextt = "[{ff001c}Offline{F2EEF0}]";
}
if(IsPlayerConnected(GetPlayerID(pLeaders[1])))
{
ttextt= "[{22ff00}Online{F2EEF0}]";
}
else
{
ttextt= "[{ff001c}Offline{F2EEF0}]";
}
format(string, sizeof(string), "LSPD: %s %s\nFBI: %s %s", pLeaders[0],ttextt,pLeaders[1],ttextt);
ShowPlayerDialog(playerid,8822,DIALOG_STYLE_MSGBOX,"Лидеры",string,"Ок","");
ini_closeFile(file);
return 1;
}
Ошибки:
error 032: array index out of bounds (variable "pLeaders")
error 032: array index out of bounds (variable "pLeaders")
error 032: array index out of bounds (variable "pLeaders")
{
new file = ini_openFile("gamefiles/log/leaders.ini");
ini_getString(file,"MARYA",pLeaders[0]);
ini_getString(file,"FBI",pLeaders[1]);
new ttextt[32];
if(IsPlayerConnected(GetPlayerID(pLeaders[0])))
{
ttextt = "[{22ff00}Online{F2EEF0}]";
}
else
{
ttextt = "[{ff001c}Offline{F2EEF0}]";
}
if(IsPlayerConnected(GetPlayerID(pLeaders[1])))
{
ttextt= "[{22ff00}Online{F2EEF0}]";
}
else
{
ttextt= "[{ff001c}Offline{F2EEF0}]";
}
format(string, sizeof(string), "LSPD: %s %s\nFBI: %s %s", pLeaders[0],ttextt,pLeaders[1],ttextt);
ShowPlayerDialog(playerid,8822,DIALOG_STYLE_MSGBOX,"Лидеры",string,"Ок","");
ini_closeFile(file);
return 1;
}
Ошибки:
error 032: array index out of bounds (variable "pLeaders")
error 032: array index out of bounds (variable "pLeaders")
error 032: array index out of bounds (variable "pLeaders")
