Which option to use?
#1

Option 1:

Код:
enum einv
{
	inv,
	amount
};
new Inventory[MAX_PLAYERS][15][einv];
Option 2:

Код:
enum einv
{
	inv,
	amount
};
new Inventory[MAX_PLAYERS][einv][15];
Option 3:

Код:
enum einv
{
	inv[15],
	amount[15]
};
new Inventory[MAX_PLAYERS][einv];
Option 4:

Код:
new InventoryItem[MAX_PLAYERS][15];
new InventoryAmount[MAX_PLAYERS][15];
Reply
#2

Option 3
Reply
#3

Option 4
Reply
#4

Option 4
Reply
#5

there is no different between option 2 and 4 just clearness and memory
Reply
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
That is quite obviously wrong, just from looking at the code! Did you mean 2 and 3?

enums are a convenience - they make code look slightly cleaner at the expense of some speed. So there is no “best” answer, it depends on whether you prefer cleanliness (3) or speed (4).
tnx for info and i meant 3 and 4 ye i told that different in speed and memory i meant that
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)