Limit?
#1

Hello. I have an array with 4 dimensions.

Pawno says that is too much.
I can't create more than 3?
Is any way to broke this limit?

Help please ;f
Reply
#2

only 2
Reply
#3

What do you need 4 dimensions for? Theres certainly an alternative.
Reply
#4

I need 4 dimensions for game:

Код:
new Game[Category][RoomID][MapID][Data];
And it's only for one game, not for all games in server.
Reply
#5

use enum
Reply
#6

[Data] is an enum.

And in enum are more dimensions...

So I using actually 5 dimensions
Reply
#7

What exactly is the error you're getting? Maybe you're misinterpreting it.
Reply
#8

Why do you need all those extra elements?

pawn Код:
#define MAX_GAME_SLOTS 5

enum eGames
{
    game_category,
    game_room,
    game_map,
    game_data,
    and_so_on
};

new aGames[MAX_GAME_SLOTS][eGames];
Reply
#9

He's right, you're viewing arrays the wrong way. If you make a new dimension for each variable, we'd have codes like this everywhere:
PHP код:
Employee[wage][age][employeer][rank][gender] = 1
...which doesn't make a lot of sense.
Reply
#10

https://sampforum.blast.hk/showthread.php?tid=483994
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)