Can I use such arrays?
#7

If your going to use something like this....

new PlayerInfo[MAX_PLAYERS][4][pInfo];

At least make some defines.....

#define MAX_CLASSES 4
#define CLASS_CLASSNAME1 0
#define CLASS_CLASSNAME2 1
#define CLASS_CLASSNAME3 2
#define CLASS_CLASSNAME4 3

This is much easier to keep track of what your writing.

new PlayerInfo[MAX_PLAYERS][MAX_CLASSES ][pInfo];

for(new i = 0; i < MAX_CLASSES; i++)

if(PlayerInfo[playerid][CLASS_CLASSNAME][p_Kill] == 10) KillSpree = true;

It looks a lot better I think.
Reply


Messages In This Thread
Can I use such arrays? - by Darth1993 - 02.04.2013, 13:21
Re: Can I use such arrays? - by Konstantinos - 02.04.2013, 13:25
Re: Can I use such arrays? - by faff - 02.04.2013, 13:25
Re: Can I use such arrays? - by Darth1993 - 02.04.2013, 13:31
Re: Can I use such arrays? - by faff - 02.04.2013, 13:32
Re: Can I use such arrays? - by Darth1993 - 02.04.2013, 13:34
Re: Can I use such arrays? - by Pottus - 02.04.2013, 14:00
Re: Can I use such arrays? - by glbracer - 02.04.2013, 15:47

Forum Jump:


Users browsing this thread: 2 Guest(s)