Raised This Month: $51 Target: $400
 12% 

[ TUT ]Dynamic Array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 


Thread Tools
Display Modes

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 06:10.


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