22.03.2013, 12:12
Everything is loading fine but the business name.
Code:
Debug line:
printf("%i | %s | %f | %f | %f", FirmaInfo[i][fID], FirmaInfo[i][fNimi],
FirmaInfo[i][fOut][0], FirmaInfo[i][fOut][1], FirmaInfo[i][fOut][2]);
Shows this:
[14:06:31] 1 | | 1524.430053 | -1678.319946 | 13.231599
Anyone has good eyes and sees the mistake?
Code:
pawn Код:
forward LaeFirmad();
public LaeFirmad()
{
new rows, fields, string[128];
cache_get_data(rows, fields);
for (new i; i < rows; i++)
{
FirmaInfo[i][fID] = cache_get_field_int(i, "ID");
cache_get_field_content(i, "nimi", FirmaInfo[i][fNimi]); // Problem should be here
FirmaInfo[i][fOut][0] = cache_get_field_float(i, "outX");
FirmaInfo[i][fOut][1] = cache_get_field_float(i, "outY");
FirmaInfo[i][fOut][2] = cache_get_field_float(i, "outZ");
FirmaInfo[i][fIn][0] = cache_get_field_float(i, "inX");
FirmaInfo[i][fIn][1] = cache_get_field_float(i, "inY");
FirmaInfo[i][fIn][2] = cache_get_field_float(i, "inZ");
FirmaInfo[i][fRob][0] = cache_get_field_float(i, "robX");
FirmaInfo[i][fRob][1] = cache_get_field_float(i, "robY");
FirmaInfo[i][fRob][2] = cache_get_field_float(i, "robZ");
printf("%i | %s | %f | %f | %f", FirmaInfo[i][fID], FirmaInfo[i][fNimi],
FirmaInfo[i][fOut][0], FirmaInfo[i][fOut][1], FirmaInfo[i][fOut][2]);
if (FirmaInfo[i][fOut][0] != 0.0)
{
CreateDynamicPickup(1239, 1, FirmaInfo[i][fOut][0], FirmaInfo[i][fOut][1], FirmaInfo[i][fOut][2]);
CreateDynamicPickup(1239, 1, FirmaInfo[i][fIn][0], FirmaInfo[i][fIn][1], FirmaInfo[i][fIn][2]);
CreateDynamicPickup(1239, 1, FirmaInfo[i][fRob][0], FirmaInfo[i][fRob][1], FirmaInfo[i][fRob][2]);
format(string, sizeof(string), "Firma: %s", FirmaInfo[i][fNimi]);
CreateDynamic3DTextLabel(string, COLOR_YELLOW, FirmaInfo[i][fOut][0], FirmaInfo[i][fOut][1], FirmaInfo[i][fOut][2], 20);
CreateDynamic3DTextLabel("/rццvi", COLOR_RED, FirmaInfo[i][fRob][0], FirmaInfo[i][fRob][1], FirmaInfo[i][fRob][2], 20);
}
}
printf("Laeti %i firmat.", rows);
}
Debug line:
printf("%i | %s | %f | %f | %f", FirmaInfo[i][fID], FirmaInfo[i][fNimi],
FirmaInfo[i][fOut][0], FirmaInfo[i][fOut][1], FirmaInfo[i][fOut][2]);
Shows this:
[14:06:31] 1 | | 1524.430053 | -1678.319946 | 13.231599
Anyone has good eyes and sees the mistake?