4D Arrays - A possible way to sort them out?
#1

Hello everyone,

I've been thinking to code something recently and now I'm in a difficult state in declaring some arrays. I don't know what, my mind is too blank right now in trying to sort this out. I'm trying to group a player's data - For example, a simple template message storage.
pawn Код:
#define MAX_TEMPLATE_TYPES  5 //Type of templates.
#define MAX_TEMPLATES 10 //Number of templates which each TYPE of templates could have.


new pExample[MAX_PLAYERS][MAX_TEMPLATE_TYPES][MAX_TEMPPLATES][128];
So what I really need is per-player templates, in such a way that there's a type of template while creating and 10 templates could be stored for each template type. Unfortunately, 4D arrays aren't supported and I couldn't find any methods to sort things out. If anyone would be able to clear this out, it'd be really good for me.

Thanks in advance.
Reply
#2

Nothing stops you from doing this:

pawn Код:
new pExample[MAX_PLAYERS][MAX_TEMPLATE_TYPES * MAX_TEMPPLATES][128];
Reply
#3

Quote:
Originally Posted by xeeZ
Посмотреть сообщение
Nothing stops you from doing this:

pawn Код:
new pExample[MAX_PLAYERS][MAX_TEMPLATE_TYPES * MAX_TEMPPLATES][128];
Thanks, it works well now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)