Raised This Month: $ Target: $400
 0% 

3 Dimensional array using ArrayCreate()?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-29-2021 , 20:02   Re: 3 Dimensional array using ArrayCreate()?
Reply With Quote #1

A dynamic array does not support multiple dimensions. It would probably be better to understand why you think you need a 3D array. Many of the types of questions like this end up simply needing to think about the use case differently. So, what type of data are you trying to store?
__________________
fysiks is offline
AdrenalinesWrath
Junior Member
Join Date: Aug 2017
Old 12-30-2021 , 16:52   Re: 3 Dimensional array using ArrayCreate()?
Reply With Quote #2

Quote:
Originally Posted by fysiks View Post
...
I see now, thank you! well I had this client side configuration plugin (api) which I wrote long ago, and it had variables such as:
Code:
new SETTING_NAME[MAX_SETTINGS][64],SETTING_PLUGIN[MAX_SETTINGS][64],
SETTING_CODE[MAX_SETTINGS][16],
bool:SETTING_EDITABLE[MAX_SETTINGS],
SETTING_DEFAULT[MAX_SETTINGS][128],
SETTING_TYPE[MAX_SETTINGS][32],
SETTING_VMIN[MAX_SETTINGS],
SETTING_VMAX[MAX_SETTINGS],
SETTING_LANG[MAX_SETTINGS][32],
SETTINGS_COUNT = 0,
SETTING_VALUE_GET[MAX_SETTINGS][MAX_VALUE_NAMES][32],
SETTING_VALUE_NAME[MAX_SETTINGS][MAX_VALUE_NAMES][64],
SETTING_VALUE_LANG[MAX_SETTINGS][MAX_VALUE_NAMES][32],
SETTING_VALUE_COUNT[MAX_SETTINGS];
I'm fine with:
Code:
new SETTING_NAME[MAX_SETTINGS][64],SETTING_PLUGIN[MAX_SETTINGS][64],
SETTING_CODE[MAX_SETTINGS][16],
bool:SETTING_EDITABLE[MAX_SETTINGS],
SETTING_DEFAULT[MAX_SETTINGS][128],
SETTING_TYPE[MAX_SETTINGS][32],
SETTING_VMIN[MAX_SETTINGS],
SETTING_VMAX[MAX_SETTINGS],
SETTING_LANG[MAX_SETTINGS][32]
but I was lost in ideas at:
Code:
SETTING_VALUE_GET[MAX_SETTINGS][MAX_VALUE_NAMES][32],
SETTING_VALUE_NAME[MAX_SETTINGS][MAX_VALUE_NAMES][64],
SETTING_VALUE_LANG[MAX_SETTINGS][MAX_VALUE_NAMES][32]
which is why I needed a 3D Array using ArrayCreate();

Quote:
Originally Posted by HamletEagle View Post
...
to be honest, I don't really remember where I read it exactly. tho here: https://wiki.alliedmods.net/Array_Module_(AMX_Mod_X)
"brings fast, easy, and efficient dynamic storage into PAWN coding"

and I recall reading it somewhere in some post, and for looping I know it will do the same effect.
tho to search for something you have to loop unlike ArrayFind, maybe it's a lot better? or does it have the same effect?

the idea and information you've posted is what I needed, thank you very much!
__________________
"True Strength's keeping everything together, while everyone expects you to fall apart."
AdrenalinesWrath is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode