AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ERROR: Multi-Dimensional Arrays Must Be Fully Initialized (https://forums.alliedmods.net/showthread.php?t=114107)

wrecked_ 01-01-2010 23:13

ERROR: Multi-Dimensional Arrays Must Be Fully Initialized
 
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"
};


YamiKaitou 01-02-2010 01:07

Re: ERROR: Multi-Dimensional Arrays Must Be Fully Initialized
 
Does gBlockMax equal 21?

wrecked_ 01-02-2010 16:43

Re: ERROR: Multi-Dimensional Arrays Must Be Fully Initialized
 
Negative, it's equal to 32.

Arkshine 01-02-2010 16:50

Re: ERROR: Multi-Dimensional Arrays Must Be Fully Initialized
 
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.

wrecked_ 01-02-2010 17:15

Re: ERROR: Multi-Dimensional Arrays Must Be Fully Initialized
 
Worked perfect, Arkshine. Ty

ifx 02-27-2016 05:30

Re: ERROR: Multi-Dimensional Arrays Must Be Fully Initialized
 
got same eror. thanks Arkshine for advice
now compiles great


All times are GMT -4. The time now is 04:17.

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