array question
#1

I have a question how can I make and array like

pawn Код:
new trackpagestring[128][MAX_PLAYERS][13][100];
there are too many dimensions
Reply
#2

What do you mean how? You just did.
Reply
#3

Quote:
Originally Posted by HurtLocker
Посмотреть сообщение
What do you mean how? You just did.
yes but it says that there are too many dimensions
Reply
#4

Then I suppose you can create only 3d arrays.
Reply
#5

alright so I tryed this
pawn Код:
new trackpagestring1[128][MAX_PLAYERS][100];
new trackpagestring2[128][MAX_PLAYERS][100];
new trackpagestring3[128][MAX_PLAYERS][100];
new trackpagestring4[128][MAX_PLAYERS][100];
new trackpagestring5[128][MAX_PLAYERS][100];
new trackpagestring6[128][MAX_PLAYERS][100];
new trackpagestring7[128][MAX_PLAYERS][100];
new trackpagestring8[128][MAX_PLAYERS][100];
new trackpagestring9[128][MAX_PLAYERS][100];
new trackpagestring10[128][MAX_PLAYERS][100];
new trackpagestring11[128][MAX_PLAYERS][100];
new trackpagestring12[128][MAX_PLAYERS][100];
and used it in my code and it took forever to compile and compiled at 77mb so i guess i going to have to do this a different way
Reply
#6

You actually can have a 4D Array if you use an enum however a 4D array is almost certainly over thinking a problem even a 3D array is over thinking a problem most of the time. I've only ever had to use a 4D array once in all the scripting I've done.
Reply
#7

This is obviously a ridiculously large array that you're not going to fully use. Could you tell us what you're trying to do and we can probably help you out with a solution.
Reply
#8

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
This is obviously a ridiculously large array that you're not going to fully use. Could you tell us what you're trying to do and we can probably help you out with a solution.
don't worry I found out another way of doing this without the massive array
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)