Логи выдают такое
[18:03:58] [debug] #0 001250b8 in public OtherTimer () at C:\Users\Aidar\Desktop\gamemodes\split.pwn:20966
[18:04:01] Игрок Kot_Pushok спавнился в очереди 100
[18:04:01] [debug] Run time error 4: "Array index out of bounds"
[18:04:01] [debug] Accessing element at index 65535 past array upper bound 299
[18:04:01] [debug] AMX backtrace:
[18:04:01] [debug] #0 001250b8 in public OtherTimer () at C:\Users\Aidar\Desktop\gamemodes\split.pwn:20966
[18:04:05] [debug] Run time error 4: "Array index out of bounds"
[18:04:05] [debug] Accessing element at index 65535 past array upper bound 299
[18:04:05] [debug] AMX backtrace:
[18:04:05] [debug] #0 001250b8 in public OtherTimer () at C:\Users\Aidar\Desktop\gamemodes\split.pwn:20966
[18:04:08] [debug] Run time error 4: "Array index out of bounds"
[18:04:08] [debug] Accessing element at index 65535 past array upper bound 299
[18:04:08] [debug] AMX backtrace:
[18:04:08] [debug] #0 001250b8 in public OtherTimer () at C:\Users\Aidar\Desktop\gamemodes\split.pwn:20966
[18:04:11] [debug] Run time error 4: "Array index out of bounds"
[18:04:11] [debug] Accessing element at index 65535 past array upper bound 299
[18:04:11] [debug] AMX backtrace:
[18:04:11] [debug] #0 001250b8 in public OtherTimer () at C:\Users\Aidar\Desktop\gamemodes\split.pwn:20966
Вот строчка паблик
PHP код:
publics: OtherTimer()
{
GetMoney();
foreach(new i: Player)
{
if(IsPlayerConnected(i))
{
if(CellTime[i] > 0)
{
if (CellTime[i] == 60)
{
CellTime[i] = 1;
if(Mobile[Mobile[i]] == i) CallCost[i] = CallCost[i]+callcost;
}
CellTime[i] = CellTime[i]+1;
if(Mobile[Mobile[i]] == 0 && CellTime[i] == 5)// <---- строчка 20966
{
if(IsPlayerConnected(Mobile[i]))
{
format(stringer, sizeof(stringer), "У %s звонит мобильник", PlayerInfo[Mobile[i]][pNames]);
ProxDetector(30.0, Mobile[i], stringer, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
}
if(CellTime[i] == 0 && CallCost[i] > 0)
{
format(stringer, sizeof(stringer), "~w~Phone~n~~r~%d",CallCost[i]);
PlayerInfo[i][pCash] -=-CallCost[i];
GameTextForPlayer(i, stringer, 5000, 1);
CallCost[i] = 0;
}
}
}
return true;
new CellTime[MAX_PLAYERS];
new Mobile[MAX_PLAYERS];
}
А второй раз вот
[18:09:21] [debug] AMX backtrace:
[18:09:21] [debug] #0 002a4c34 in strcharsplit (string[]=@0x004c5bb4 "", &index=@0x004c8928, seperator=32) at C:\Users\Aidar\Desktop\gamemodes\split.pwn:39065
[18:09:21] [debug] #1 00268448 in public OnPlayerCommandTextEx (playerid=24, cmdtext[]=@0x004c5bb4 "") at C:\Users\Aidar\Desktop\gamemodes\split.pwn:35863
[18:09:21] [debug] #2 0038a4b0 in public OnPlayerCommandPerformed (playerid=24, cmdtext[]=@0x004c5bb4 "", success=0) at C:\Users\Aidar\Desktop\gamemodes\split.pwn:46914
[18:09:21] [debug] #3 0000d8ac in public OnPlayerCommandText (playerid=24, cmdtext[]=@0x004c5b14 "") at C:\Users\Aidar\Desktop\ппавн др\pawno\include\zcmd.inc:108
[18:09:23] [debug] Run time error 4: "Array index out of bounds"
[18:09:23] [debug] Accessing element at index 20 past array upper bound 19
[18:09:23] [debug] AMX backtrace:
[18:09:23] [debug] #0 002a4c34 in strcharsplit (string[]=@0x004c5ba8 "", &index=@0x004c8928, seperator=32) at C:\Users\Aidar\Desktop\gamemodes\split.pwn:39065
[18:09:23] [debug] #1 00268448 in public OnPlayerCommandTextEx (playerid=24, cmdtext[]=@0x004c5ba8 "") at C:\Users\Aidar\Desktop\gamemodes\split.pwn:35863
[18:09:23] [debug] #2 0038a4b0 in public OnPlayerCommandPerformed (playerid=24, cmdtext[]=@0x004c5ba8 "", success=0) at C:\Users\Aidar\Desktop\gamemodes\split.pwn:46914
[18:09:23] [debug] #3 0000d8ac in public OnPlayerCommandText (playerid=24, cmdtext[]=@0x004c5b14 "") at C:\Users\Aidar\Desktop\ппавн др\pawno\include\zcmd.inc:108
[18:09:24] Аккаунт Nikita_Dragynov был успешно сохранён.(2211)
[18:09:24] [part] Nikita_Dragynov has left the server (23:1)
строчка 39065
PHP код:
stock strcharsplit(const string[], &index, seperator=' '){
new result[20], i = 0;
if (index != 0 && string[index] != '\0') index++;
while (string[index] && string[index] != seperator && string[index] != '\r' && string[index] != '\n'){
result[i++] = string[index++];// <---- эта строчка
}
return result;
}
строчка 35863
PHP код:
//===============================================================================
else if(strcmp(cmd, "/sethp", true) == 0)
{
if(PlayerDeathmatch[playerid] > 0 && DeathmatchRound == 0) return SendClientMessage(playerid,COLOR_WHITE,"Запрещено использовать в бою!");
tmp = strcharsplit(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, " Введите: /sethp [id] [уровень hp]");
if(anti[playerid] == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "[Анти-Наказание] Вы словили блок на наказание сроком 5 минут.");
new playa = ReturnUser(tmp);
tmp = strcharsplit(cmdtext, idx);//<--- эта строчка
new health = strval(tmp);
if (PlayerInfo[playerid][pAdmInections] >= 7)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
PlayerHealth[playa] = health;
antiwarn[playerid] += 8;
if(antiwarn[playerid] >= 30 && anti[playerid] == 0) anti[playerid] = 1, antiwarn[playerid] = 300;
SetPlayerHealthAC(playa, health);
SendClientMessage(playerid, COLOR_WHITE, "Уровень hp игроку установлен");
format(stringer,sizeof(stringer),"[SETHP] Администратор: %s установил уровень HP игроку %s на %i ",PlayerInfo[playerid][pNames],PlayerInfo[playa][pNames],health);
ABroadCast(0x6495EDFF,stringer,1);
}
}
}
else { SendClientMessage(playerid, COLOR_GRAD1, "Вы не уполномочены использовать эту команду!"); }
return true;
}
Из-за этого сервер делает рестарты!