[HELP] How to make a dynamic array?
#4

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.*/
Any ideas are welcome.
Reply


Messages In This Thread
[HELP] How to make a dynamic array? - by LTomi - 15.05.2010, 13:25
Re: [HELP] How to make a dynamic array? - by juice.j - 15.05.2010, 13:31
Re: [HELP] How to make a dynamic array? - by Killa_ - 15.05.2010, 13:34
Re: [HELP] How to make a dynamic array? - by LTomi - 15.05.2010, 14:08
Re: [HELP] How to make a dynamic array? - by juice.j - 15.05.2010, 14:18
Re: [HELP] How to make a dynamic array? - by Killa_ - 15.05.2010, 14:22
Re: [HELP] How to make a dynamic array? - by LTomi - 15.05.2010, 14:22
Re: [HELP] How to make a dynamic array? - by juice.j - 15.05.2010, 14:23
Re: [HELP] How to make a dynamic array? - by LTomi - 15.05.2010, 14:24
Re: [HELP] How to make a dynamic array? - by Killa_ - 15.05.2010, 14:25

Forum Jump:


Users browsing this thread: 1 Guest(s)