Raised This Month: $ Target: $400
 0% 

Global array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-22-2012 , 01:33   Re: Global array
Reply With Quote #21

Quote:
Originally Posted by Doc-Holiday View Post
using dynamic arrays...

Code:
CreateArray

Syntax:
native Handle:CreateArray(blocksize=1, startsize=0);

Usage:
 blocksize        The number of cells each member of the array can hold.  For example, 32 cells is equivalent to: new Array[X][32]
 startsize        Initial size of the array.  Note that data will NOT be auto-intialized.
PHP Code:
new Handle:g_SteamIdArray;

g_SteamIdArray CreateArray(21); //<-- Number of cells each member can have..
PushArrayString(g_SteamIdArray SteamIdGoesHere); //<--- To set a string value 
You forgot the difference between cell and byte. 21 bytes would require 6 cells.
__________________
FaTony is offline
 



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:41.


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