Raised This Month: $ Target: $400
 0% 

Global array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 10-22-2012 , 15:29   Re: Global array
Reply With Quote #25

Quote:
Originally Posted by Doc-Holiday View Post
you were asking for an example....... lol so i showed you how to use it and yes according to the way the post are after mine the above code would create what you want. however the wiki shows

new Array[X][32];
is the same as
CreateArray(32);
A few things:
1. new Array[X][32] will give you tag errors if you try to use Strings with it.
2. new String:Array[X][32] creates an array that takes up 1/4 the space that new Array[X][32] does. Same with CreateArray(ByteCountToCells(32)) versus CreateArray(32) because ByteCountToCells(32) returns 8. Just as important, ByteCountToCells may change at a later date if a 64-bit version of srcds appears and SourcePawn starts using 64-bit cells, meaning that you shouldn't hard-code 8 there either.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 10-22-2012 at 15:31.
Powerlord 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