29.01.2016, 11:59
Why read every field as a string, to convert it to a integer or float afterwards before it can be stored in a variable?
You should set your columns to the correct type and read it directly.
Cleaner and shorter code will be your result.
Isn't this easier to read and follow?
You should set your columns to the correct type and read it directly.
Cleaner and shorter code will be your result.
PHP код:
CampInfo[extraid][i][cOwner] = cache_get_field_content_int(i, "Owner", MainPipeline);
CampInfo[extraid][i][cID] = cache_get_field_content_int(i, "id", MainPipeline);
if(CampInfo[extraid][i][cID] != 0)
{
CampInfo[extraid][i][cPosition][0] = cache_get_field_content_float(i, "cPosX", MainPipeline);
CampInfo[extraid][i][cPosition][1] = cache_get_field_content_float(i, "cPosY", MainPipeline);
CampInfo[extraid][i][cPosition][2] = cache_get_field_content_float(i, "cPosZ", MainPipeline);
CampInfo[extraid][i][cPosition][3] = cache_get_field_content_float(i, "cPosAngle", MainPipeline);
CampInfo[extraid][i][cLocked] = cache_get_field_content_int(i, "cLock", MainPipeline);
CampInfo[extraid][i][cVW] = cache_get_field_content_int(i, "cVirtualWorld", MainPipeline);