LoadVehs()
#3

Quote:
Originally Posted by Miokie*
Any ideas what could be causing this?
Sure

pawn Код:
LoadVehs()
{
  new i,File:pos=fopen("Vehs.txt", io_read),arrCoords[5][128];
  //all cells of arrCoords are 0 after creation
  while(i < sizeof(BoughtVehs))
  {
        BoughtVehs[i][vModel] = strval(arrCoords[0]);
        BoughtVehs[i][bvX] = floatstr(arrCoords[1]);
        BoughtVehs[i][bvY] = floatstr(arrCoords[2]);
        BoughtVehs[i][bvZ] = floatstr(arrCoords[3]);
        BoughtVehs[i][bvA] = floatstr(arrCoords[4]);
        //strval or floatstr nothing will return 0

        CreateVehicle(BoughtVehs[i][vModel],BoughtVehs[i][bvX],BoughtVehs[i][bvY],BoughtVehs[i][bvZ],BoughtVehs[i][bvA],-1,-1,9999999);
        //CreateVehicle(0, 0.0, 0.0, 0.0, 0.0, -1, -1, 9999999); will crash
        fclose(pos);
    }
}
And there are still some other mistakes
Reply


Messages In This Thread
LoadVehs() - by miokie - 30.05.2009, 15:17
Re: LoadVehs() - by Correlli - 30.05.2009, 18:29
Re: LoadVehs() - by Nero_3D - 30.05.2009, 18:35
Re: LoadVehs() - by miokie - 30.05.2009, 19:10

Forum Jump:


Users browsing this thread: 1 Guest(s)