Raised This Month: $ Target: $400
 0% 

Help|Variables


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-20-2011 , 16:34   Re: Help|Variables
Reply With Quote #3

The above code will error if a player connected on slot # 32 since the first dimension is sized 32 which leaves the upper boundary of the array 31, it should be sized 33.

Its called a 2-dimension array.

Var[] = 1 dimension
Var[][] = 2 dimension

For each item in the first dimension you have dimension-2 cells of storage. These are used for storing various types of data and commonly used for string arrays since each letter occupies a cell.

Var[ 4 ][ 10 ]

Here you have essentially 4 arrays each sized at 10 cells.

Here is a graphic I found that may help
__________________

Last edited by Bugsy; 09-20-2011 at 16:37.
Bugsy is online now
 



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 19:40.


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