SA-MP Forums Archive
array question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: array question (/showthread.php?tid=437519)



4 dimensional array - horsemeat - 16.05.2013

I have a question how can I make and array like

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


AW: array question - HurtLocker - 16.05.2013

What do you mean how? You just did.


Re: AW: array question - horsemeat - 16.05.2013

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


AW: array question - HurtLocker - 16.05.2013

Then I suppose you can create only 3d arrays.


Re: array question - horsemeat - 16.05.2013

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


Re: array question - Pottus - 16.05.2013

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.


Re: array question - [HiC]TheKiller - 16.05.2013

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.


Re: array question - horsemeat - 16.05.2013

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