View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-19-2017 , 12:51   Re: [ TUT ]Dynamic Array
Reply With Quote #11

Try to use this in a plugin and compile:
PHP Code:
 new g_newArray[] 
It won't work. Arrays in pawn have a fixed size, which you must specify. Dynamic array allows you to go around this limitation and have unlimited storage space. If you know how much you will store, then likely dynamic arrays are not needed.
You would commonly use them where you don't know how many data will be stored(for example when reading a file with a custom configuration made by user).

Quote:
2. why is this called a 2 Dimensional array if it has got 3 parameters
That's not 2 dimensional, it's 3 dimensional. A bi-dimensional would be new test[34][34]. It's like a matrix.

3.What kind of explanation you want? Anyway, I know I should re-write this, it's old and I don't like how it is right now.
__________________

Last edited by HamletEagle; 01-19-2017 at 12:53.
HamletEagle is offline