View Single Post
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 04-02-2011 , 13:16   Re: How can I create an array of strings?
Reply With Quote #2

Yup, that's the correct way, but by using new, it blanks out all the values so you don't need to set them:

PHP Code:
new String:myArr[64][40];

// If you wanted define some values
new String:myArr[][] =
{
     
"first string",
     
"second string"
}; 
This creates 64 strings, each with a 40 character limit. To read one of them, we would do:
PHP Code:
PrintToServer("The value is: %s"myArr[0]); 
__________________

Last edited by pheadxdll; 04-02-2011 at 13:18.
pheadxdll is offline