18.01.2013, 18:41
Calm down.
Try that
pawn Код:
LoadVehicles()
{
new idx;
while (idx < sizeof(VehicleInfo))
{
new arrCoords[23][64],strFromFile2[256],idx;
new File: file = fopen("/Nekretnine/Vozilo_%d.cfg", io_read, idx);
if (file)
{
fread(file, strFromFile2);
VehicleInfo[idx][vOwned] = strvalEx(arrCoords[0]);
strmid(VehicleInfo[idx][vOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
VehicleInfo[idx][vLocationX] = strvalEx(arrCoords[2]);
VehicleInfo[idx][vLocationY] = strvalEx(arrCoords[3]);
VehicleInfo[idx][vLocationZ] = strvalEx(arrCoords[4]);
printf("Vozilo %d je uspjesno ocitano.\n",idx);
idx++;
}
fclose(file);
}
return 1;
}