[SP] String Arrays.....
Just a simple question.
new String:AbilityNumInfo[255][10]; AbilityNumInfo[255][X] = "Blah"; I get array index out of bounds error. I'm not entirely sure what is wrong. Thanks in advance. :) |
Re: [SP] String Arrays.....
An array of length 255 has 255 elements, numbered 0 through 254. So, index 255 is indeed out of bounds.
|
Re: [SP] String Arrays.....
Oh.... Thanks!
|
Re: [SP] String Arrays.....
How would I go about modifying the string? I get a must be assigned to an array error using this.
AbilityNumInfo[255][1] = "Name"; Damnit. |
Re: [SP] String Arrays.....
A string is an array. Use
PHP Code:
|
| All times are GMT -4. The time now is 11:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.