Something about dynamic arrays
Hello,
so here is the thing, i know what it does but i don't understand how it does it if someone can explain it would be much appreciated, Thanks! PHP Code:
|
Re: Something about dynamic arrays
Basic 2D arrays have a set size that cannot change, while dynamic arrays can adjust their size during runtime. Basic 2D arrays are best when you know the size beforehand and it won't change. Dynamic arrays are more flexible for changing sizes as needed.
Natives are explained and given examples https://forums.alliedmods.net/showthread.php?t=249602 https://www.amxmodx.org/api/cellarray/__functions |
Re: Something about dynamic arrays
Its not that thing i was talking about these lines
PHP Code:
|
Re: Something about dynamic arrays
I've read the tutorial long time ago and i know how to make dynamic arrays and use them, the thing that is confusing me when i push an dyn array that has strings into an dyn array ( 1 cell ) what happens,
and when i want to know the strings i put into that dyn array i use this PHP Code:
usage example ? for example i created skins menu with ini file and there is 6 type each skin has 1...5 skins [SKIN 1] Skins = myskin1, ....ect [SKIN 2]... when u select u get random skins from the total skins. what i don't really understand is that how that works cause i know how to do it i've seen the way in zp50_zombie_class system |
Re: Something about dynamic arrays
Nvm i understood it.
|
Re: Something about dynamic arrays
Quote:
|
Re: Something about dynamic arrays
Well yea, thats the thing i think my post is useless and if u can delete it i just didn't know that u can pass an dyn array into dyn array
|
Re: Something about dynamic arrays
Other people may be in the same boat as you, and find your post. Problem solved.
|
Re: Something about dynamic arrays
I suspect that the important thing to know about dynamic arrays is that the array handle is just a reference to the actually data and it can be stored like you would do with any other variable. This is why, you can store many of these array handles into a dynamic array making a pseudo-2D dynamic array.
|
Re: Something about dynamic arrays
Thanks, that's exactly what i needed to hear!
|
All times are GMT -4. The time now is 21:53. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.