Raised This Month: $51 Target: $400
 12% 

ERROR: Multi-Dimensional Arrays Must Be Fully Initialized


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-01-2010 , 23:13   ERROR: Multi-Dimensional Arrays Must Be Fully Initialized
Reply With Quote #1

As you can see by the title, I'm having a little issues with an error. At the moment, I'm getting the error
Code:
error 052: multi-dimensional arrays must be fully initialized
Now I don't know what this means, or how to fix it. It specifies line 300, but all that's on line 300 is a bracket closing. ex: };

I get the feeling this means that that entire bracket has something wrong with it. The entire bracket is:
Code:
new const gszBlockNames[gBlockMax][32] = 
{
"Platform",
"Bunnyhop",
"Damage",
"Healer",
"No Fall Damage",
"Ice",
"Trampoline",
"Speed Boost",
"Invincibility",
"Stealth",
"Death",
"Camouflage",
"Low Gravity",
"Fire",
"Slap",
"Random",
"Honey",
"CT Barrier",
"T Barrier",
"Boots Of Speed",
"Glass"
};
wrecked_ is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-02-2010 , 01:07   Re: ERROR: Multi-Dimensional Arrays Must Be Fully Initialized
Reply With Quote #2

Does gBlockMax equal 21?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-02-2010 , 16:43   Re: ERROR: Multi-Dimensional Arrays Must Be Fully Initialized
Reply With Quote #3

Negative, it's equal to 32.
wrecked_ is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-02-2010 , 16:50   Re: ERROR: Multi-Dimensional Arrays Must Be Fully Initialized
Reply With Quote #4

You don't need to provide a size, you can write directly: new const gszBlockNames[][] and to retrieve the array size you can use sizeof gszBlockNames ; this way you avoid to modify each time a var if you add elements in the array.
__________________
Arkshine is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-02-2010 , 17:15   Re: ERROR: Multi-Dimensional Arrays Must Be Fully Initialized
Reply With Quote #5

Worked perfect, Arkshine. Ty
wrecked_ is offline
ifx
Senior Member
Join Date: Apr 2008
Old 02-27-2016 , 05:30   Re: ERROR: Multi-Dimensional Arrays Must Be Fully Initialized
Reply With Quote #6

got same eror. thanks Arkshine for advice
now compiles great

Last edited by ifx; 02-27-2016 at 05:30.
ifx is offline
Reply



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 03:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode