052 - multi-dimensional arrays must be fully initialized
Hey all,
i have tried to compile this on and offline and keep getting this error ... Quote:
PHP Code:
|
Re: 052 - multi-dimensional arrays must be fully initialized
You declare an array of 8 items, while you have only 7.
|
Re: 052 - multi-dimensional arrays must be fully initialized
PHP Code:
|
Re: 052 - multi-dimensional arrays must be fully initialized
i feel like such a noob thanks guys .. i know better than to enumerate my values like that.
Now what would the most efficient way be to house nameList in an .ini file and use that instead of hard coding the list in the plugin, i was trying to keep the plugin as simple as possible but it seems that if i ever wanted to change the names or add more i would have to recompile the plugin each time ... so in trying to make things easier for me and keeping the plugin small what would you suggest? |
Re: 052 - multi-dimensional arrays must be fully initialized
nameList[random_num(0,MAXNAMES)]
-> nameList[random(sizeof nameList)] By making that change you don't need MAXNAMES at all. Which would make it a lot easier to edit. Make a dynamic array. (Look in cellarray.inc) Load the names into it from the ini. Done. |
| All times are GMT -4. The time now is 10:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.