error 052: multi-dimensional arrays must be fully initialized
I really don't get how enum + multi-dimensional arrays should work together or i don't know but i thought this would work
PHP Code:
PHP Code:
PHP Code:
|
Re: error 052: multi-dimensional arrays must be fully initialized
All of the variables defined in your RegisterData enum are integers, not strings. Strings themselves are arrays so your enum needs to have the extra dimension for the length of the string (plus 1).
Here is an example of properly storing strings with enums (including examples for using it as a global dataset and as player-specific datasets): PHP Code:
|
Re: error 052: multi-dimensional arrays must be fully initialized
Quote:
As i use it for two different things: - Creating Dynamic Arrays - Creating the variable DataKeys I don't think i would have been much useful to create and use a different enumeration and still i'd have to add that [2] cuz i'm too lazy to add more lines and i don't want to make my code any bigger. So to exemplify: We have PHP Code:
PHP Code:
PHP Code:
|
Re: error 052: multi-dimensional arrays must be fully initialized
If you're using the enum strictly as an enum then what you're saying is correct. However, I interpreted what you were doing is using the enum as a pseudo-struct. When using it as if it were struct, the it should fully define the data that each element should contain (which is not the case in your version of the code). This was the basis of my response since this is how I would view your code's goal based on the little code that was provided. The strict enum usage didn't occur to me immediately when reading your post.
|
| All times are GMT -4. The time now is 15:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.