03.07.2009, 00:14
I bet this is the problem:
for(new o =0; o<sizeof(OCarInfo); o++)
It maybe create vehicle with invalid modelid.
So you need:
At last, make sure that the file is written with right syntax, no space line, no comment, etc.
for(new o =0; o<sizeof(OCarInfo); o++)
It maybe create vehicle with invalid modelid.
So you need:
pawn Код:
//TOP
static stock
OCarAmount;
//
//In LoadCars()
//edit
while (idx < sizeof(OCarInfo))
{ fread(file, strFromFile2);
//to
while(fread(file, strFromFile2){
// and add
OCarAmount = idx; //before
fclose(file);
//
//OnGameModeInit()
//edit
for(new o =0; o<sizeof(OCarInfo); o++)
//to
for(new o;o < OCarAmount ;o++)