08.11.2016, 23:06
size of cellInfo is 30 ( 0 - 29 ) but you are trying to load more than 29 indexes so - "Array index out of bounds".
In second code propably PlayerInfo[playerid][OrgID] is -1
pawn Код:
public LoadCells()
{
new rows,fields;
cache_get_data(rows,fields);
for(new i = 0; i < rows; i++)
{
if(i >= sizeof(cellInfo))
{
printf("ERROR LoadCells: You cant load more than %d cells",sizeof(cellInfo));
break;
}
cellInfo[i][cellx] = cache_get_field_content_float(i, "X");
cellInfo[i][celly] = cache_get_field_content_float(i, "Y");
cellInfo[i][cellz] = cache_get_field_content_float(i, "Z");
cellInfo[i][cella] = cache_get_field_content_float(i, "A");
}
return 1;
}
In second code propably PlayerInfo[playerid][OrgID] is -1