15.05.2010, 14:08
pawn Код:
new CarNumber[32];
forward LoadCarNumber();
forward SaveCarNumber();
pawn Код:
public LoadCarNumber()
{
new File: file11 = fopen("carnumber.cfg", io_read);
fread(file11, CarNumber);
fclose(file11);
return 1;
}
public SaveCarNumber()
{
new string[32];
new File: file22 = fopen("carnumber.cfg", io_write);
format(string, sizeof(string), "%d", strval(CarNumber));
fwrite(file22, string);
fclose(file22);
return 1;
}
enum cInfo
{
cModel,
Float:cLocationx,
Float:cLocationy,
Float:cLocationz,
Float:cAngle,
cColorOne,
cColorTwo,
cOwner[MAX_PLAYER_NAME],
cDescription[MAX_PLAYER_NAME],
cValue,
cLicense,
cRegistration,
cOwned,
};
new CarInfo[CarNumber][cInfo]; /*Here is the problem.*/