Raised This Month: $ Target: $400
 0% 

Solved error 052: multi-dimensional arrays must be fully initialized


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
AnimalMonster
Senior Member
Join Date: May 2020
Old 12-09-2022 , 12:31   error 052: multi-dimensional arrays must be fully initialized
Reply With Quote #1

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:
enum _RegisterData
{
    
RD_SystemName,
    
RD_Name,
    
RD_Model,
    
RD_Health,
    
RD_Gravity,
    
RD_Speed,
    
RD_JumpVelocity,
    
RD_Gender,
    
RD_DeadSound[2],
    
RD_KillSound[2],
    
RD_HitSound[2]
}

new 
g_DataKeys[RegisterData][] = {
    
"",
    
"NAME",
    
"MODEL",
    
"HEALTH",
    
"GRAVITY",
    
"SPEED",
    
"JUMP_POWER",
    
"GENDER",
    {
"DEAD_SOUND1""DEAD_SOUND2"},
    {
"KILL_SOUND1""KILL_SOUND2"},
    {
"PAIN_SOUND1""PAIN_SOUND2"},

Edit: Solved..
PHP Code:
enum _RegisterData
{
    
RD_SystemName,
    
RD_Name,
    
RD_Model,
    
RD_Health,
    
RD_Gravity,
    
RD_Speed,
    
RD_JumpVelocity,
    
RD_Gender,
    
RD_DeadSound[2],
    
RD_KillSound[2],
    
RD_HitSound[2]
}

new 
g_DataKeys[RegisterData][] = {
    
"",
    
"NAME",
    
"MODEL",
    
"HEALTH",
    
"GRAVITY",
    
"SPEED",
    
"JUMP_POWER",
    
"GENDER",
    
"DEAD_SOUND1"
    
"DEAD_SOUND2",
    
"KILL_SOUND1"
    
"KILL_SOUND2",
    
"PAIN_SOUND1"
    
"PAIN_SOUND2"

And i have to use it like
PHP Code:
g_DataKeys[RD_DeadSound][0

Last edited by AnimalMonster; 12-09-2022 at 13:15.
AnimalMonster is offline
 



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 15:38.


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