04.07.2015, 11:44
PHP код:
[11:32:30] [debug] Run time error 4: "Array index out of bounds"
[11:32:30] [debug] Accessing element at index 30 past array upper bound 29
[11:32:30] [debug] AMX backtrace:
[11:32:30] [debug] #0 0008e334 in public OnTurfsLoad () from gm.amx
[11:32:31] [debug] Run time error 4: "Array index out of bounds"
[11:32:31] [debug] Accessing element at index 30 past array upper bound 29
[11:32:31] [debug] AMX backtrace:
[11:32:31] [debug] #0 00081040 in public SetPlayerUnjail () from gm.amx
[11:32:32] [debug] Run time error 4: "Array index out of bounds"
[11:32:32] [debug] Accessing element at index 30 past array upper bound 29
[11:32:32] [debug] AMX backtrace:
PHP код:
public LoadTurfs()
{
print("\nLoading Turfs ...\n");
mysql_function_query(handle,"SELECT * FROM `turfs`",true,"OnTurfsLoad","");
return 1;
}
forward OnTurfsLoad();
public OnTurfsLoad()
{
for(new i = 0;i<cache_get_row_count(handle);i++)
{
TurfInfo[i][zSQLid] = i;
cache_get_row(i,1,TurfInfo[i][zOwner],handle,64);
TurfInfo[i][zMinX] = cache_get_row_float(i,2,handle);
TurfInfo[i][zMinY] = cache_get_row_float(i,3,handle);
TurfInfo[i][zMaxX] = cache_get_row_float(i,4,handle);
TurfInfo[i][zMaxY] = cache_get_row_float(i,5,handle);
}
for(new i = 0; i < sizeof(TurfInfo); i++)
{
Turfs[i] = GangZoneCreate(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY]);
turfattacker[i] = 9999;
turfkhod[i] = 9999;
killsattackerturf[i] = 0;
deathsattackerturf[i] = 0;
killskhodturf[i] = 0;
deathskhodturf[i] = 0;
scoreattacker[i] = 0;
scorekhod[i] = 0;
TurfTime[i] = 0;
TurfReload[i] = 0;
}
print("\nAll Turfs Loaded.\n");
return 1;
}