09.12.2013, 19:25
Mi servidor se apaga solo y aparece esto en el serv.log
Lineas del error
PHP код:
[debug] Run time error 4: "Array index out of bounds"
[debug] Accessing element at index 501 past array upper bound 1173768
[debug] Backtrace (most recent call first):
[debug] #0 severTimers2()+0x30 at C:\Users\Dropex\Downloads\VirtualCityRP\VirtualCityRP\gamemodes\VG-RP.pwn:65900
[debug] #1 public severTimers2@_yT()+0x14 at C:\Users\Dropex\Downloads\VirtualCityRP\VirtualCityRP\gamemodes\VG-RP.pwn:65899
[debug] Aborting...
PHP код:
timer severTimers2[1000](){
foreach(Player, i){
if(IsPlayerConnected(i) && gPlayerLogged{i} == 1){
if(Info[i][pTimePayDay] >= 0)
{
new string[128];
Info[i][pTimePayDay]++;
if(Info[i][pTimePayDay] >= 3600){
new tmpintrate, interest, paytotal;
tmpintrate = 1;
interest = (Info[i][pAccount]/1000)*(tmpintrate);
paytotal = Info[i][pPayCheck]-TaxValue;
if(Info[i][pVIP] == 0 && interest > 50000) interest = 50000;
else if(Info[i][pVIP] == 1 && interest > 100000) interest = 100000;
else if(Info[i][pVIP] == 2 && interest > 150000) interest = 150000;
else if(Info[i][pVIP] == 3 && interest > 200000) interest = 200000;
else if(Info[i][pVIP] >= 4 && interest > 250000) interest = 250000;
Info[i][pAccount] += interest;
if(Info[i][p_Pr_Time] == 10){
SendClientMessageEx(i, COLOR_WHITE, " Ya puedes volver hacer viajes de camionero.");
Info[i][p_Pr_Time] = 0;
}
if(Info[i][pRenting] != INVALID_HOUSE_ID){
if(HouseInfo[Info[i][pRenting]][hRentFee] > Info[i][pAccount]){
Info[i][pRenting] = INVALID_HOUSE_ID;
SendClientMessageEx(i, COLOR_WHITE, "Fuiste desalojado de la casa que rentabas.");
}
else{
HouseInfo[Info[i][pRenting]][hSafeMoney] += HouseInfo[Info[i][pRenting]][hRentFee];
Info[i][pAccount] -= HouseInfo[Info[i][pRenting]][hRentFee];
}
}
Info[i][pRob] = 0;
if(Info[i][pVIP] >= 4) Info[i][pVTokens]+= 2;
if(Info[i][pDobleExp] == 0){Info[i][pExp] += 1;}
else{
Info[i][pExp] += 2;
Info[i][pDobleExp]--;
format(string, sizeof(string), "* Ganaste 2 puntos de respeto por tener horas de doble experiencia, te quedan %d horas mбs.", Info[i][pDobleExp]);
SendClientMessageEx(i, COLOR_YELLOW, string);
}
SendClientMessageEx(i, COLOR_WHITE, "* ESTADO DE CUENTA DEL BANCO DE SAN ANDREAS * ");
format(string, sizeof(string), " Pago: $%d | Impuestos : -$%d", Info[i][pPayCheck], TaxValue);
SendClientMessageEx(i, COLOR_GRAD2, string);
format(string, sizeof(string), " Interйs ganado: 0.%d por ciento", interest);
SendClientMessageEx(i, COLOR_GRAD2, string);
Info[i][pAccount] += paytotal;
format(string, sizeof(string), " Total: $%d | N. Balance : %d$", paytotal, Info[i][pAccount]);
SendClientMessageEx(i, COLOR_GRAD2, string);
SendClientMessageEx(i, COLOR_WHITE, "-------------------------------------------------");
//GivePlayerCash(i, paytotal);
Info[i][pPayCheck] = 0;
Info[i][pTimePayDay] = 0;
Info[i][pConnectTime] += 1;
RewardPlayer(i);
OnPlayerSavedStats(i);
GameTextForPlayer(i, "~y~Pay~n~~w~Check", 5000, 1);
}
}
if(GetPlayerPing(i) > MAX_PING){
new string[128];
format(string, sizeof(string), "{0D56E7}[STAFF] >> {FFFFFF} %s ha sido kikeado por tener %d de ping (maximo: 1500).", GetPlayerNameEx(i), GetPlayerPing(i) );
ABroadCast(COLOR_GENERAL, string, 2);
SendClientMessageEx(i, COLOR_GENERAL, "SERVER: {FFFFFF}Has sido expulsado del servidor, tu ping superу el mбximo.");
Kick(i);
}