error 052: multi-dimensional arrays must be fully initialized
#1

pawn Code:
new TeamInfo[MAX_TEAMS][gInfo]= {
{"Civilian", CIVILIAN_COLOR, 0, 0, 0, 0, 0, "None","None","None","None","City Manager","Mayor",},
{"Grove Street Families", GROVE_COLOR, 0, 0, 0, 0, 0, "Gangsta","Original Gangster","Double OG","Left Hand","Right Hand","Boss"},
{"Rolling Height Ballas", BALLA_COLOR, 0, 0, 0, 0, 0, "Trainee G","Original G","Gangsta","Left Hand","Right Hand","Boss"},
{"Los Santos Vagos", VAGOS_COLOR, 0, 0, 0, 0, 0, "Rank1","Rank2","Rank3","Rank4","Rank5","Leader"},
{"Varrio Los Aztecas", AZTECA_COLOR, 0, 0, 0, 0, 0, "Rank1","Rank2","Rank3","Rank4","Rank5","Leader"},
{"Italian Mafia", TRIAD_COLOR, 0, 0, 0, 0, 0, "Driver","Guard","Killer","Manager","Right Hand","Godfather"},
{"Japanese Yakuza", YAKUZA_COLOR, 0, 0, 0, 0, 0, "Rank1","Rank2","Rank3","Rank4","Rank5","Leader"},
{"Vinewood Cripz", CRIPZ_COLOR, 0, 0, 0, 0, 0, "Gangster","Professional Gangsta","Double OG","Triple OG","Co-Boss","Boss"},
{"Los Santos Police", POLICE_COLOR, 0, 0, 0, 0, 0, "Cadet","Officer","Sergeant","Inspector","Assistant Chief","Chief"},
{"Bad Boys", BADBOYS_COLOR, 0, 0, 0, 0, 0, "Gangster","Drug Dealer","Driver","Left Hand","Right Hand","Boss"},
{"Los Santos Army", COLOR_DARKGREEN, 0, 0, 0, 0, 0, "Private","Lieutenant","Captain","Major","Colonel","General"},
{"San Andreas Army Aviation", 0x62620040, 0, 0, 0, 0, 0, "Recruit","Soldier","Major","Captain","Commander","General"},
{"Biker Boys", COLOR_RED, 0, 0, 0, 0, 0, "Trainee biker","Rider","Biker","Left Hand","Right Hand","Boss"},
{"Jizzy's Club", COLOR_PINK, 0, 0, 0, 0, 0, "Messenger","Soldier","Manager","Left Hand","Right Hand","Jizzy"},
{"Las Venturas Bloods", 0xADAD303A, 0, 0, 0, 0, 0, "Gangsta","OG","Double OG","Left Hand","Right Hand","Boss"},
{"Asian Triads", 0xFF80003E, 0, 0, 0, 0, 0, "Dealer","Gangsta","OGangsta","Left Hand","Right Hand","Da Boss"},
{"Los Santos MIB Agents", 0x3AD18D76, 0, 0, 0, 0, 0, "New Agent","Agent","Special Agent","Secret Agent","MIB Agent","Professional Agent"},
{"Russian Mafia", 0x8000FF72, 0, 0, 0, 0, 0, "Driver","Gangster","Original Gangster","Left Hand","Co-Boss","BOSS"},
{"C.I.A", 0x4E00008B, 0, 0, 0, 0, 0, "Agent","Special Agent","Secret Agent","CIA Agent","Professional Agent","BOSS"},
{"FBI", 0x808080FF, 0, 0, 0, 0, 0, "Agent","Agent","Agent","Agent","Agent","Agent"}

}; //Line 303
error log :
pawn Code:
C:\Documents and Settings\R3dZerg\Desktop\gangwars4.pwn(303) : error 052: multi-dimensional arrays must be fully initialized
Reply
#2

Try reading a little bit of the Pawn Language Guide, (specifically page 62 onwards) this isn't how you declare arrays with multiple types of data.
Reply
#3

Well, there I have to give u right!

@deqn

WTF is ; after ur last barrel?

pawn Code:
new TeamInfo[MAX_TEAMS][gInfo]= {
{"Civilian", CIVILIAN_COLOR, 0, 0, 0, 0, 0, "None","None","None","None","City Manager","Mayor",},
{"Grove Street Families", GROVE_COLOR, 0, 0, 0, 0, 0, "Gangsta","Original Gangster","Double OG","Left Hand","Right Hand","Boss"},
{"Rolling Height Ballas", BALLA_COLOR, 0, 0, 0, 0, 0, "Trainee G","Original G","Gangsta","Left Hand","Right Hand","Boss"},
{"Los Santos Vagos", VAGOS_COLOR, 0, 0, 0, 0, 0, "Rank1","Rank2","Rank3","Rank4","Rank5","Leader"},
{"Varrio Los Aztecas", AZTECA_COLOR, 0, 0, 0, 0, 0, "Rank1","Rank2","Rank3","Rank4","Rank5","Leader"},
{"Italian Mafia", TRIAD_COLOR, 0, 0, 0, 0, 0, "Driver","Guard","Killer","Manager","Right Hand","Godfather"},
{"Japanese Yakuza", YAKUZA_COLOR, 0, 0, 0, 0, 0, "Rank1","Rank2","Rank3","Rank4","Rank5","Leader"},
{"Vinewood Cripz", CRIPZ_COLOR, 0, 0, 0, 0, 0, "Gangster","Professional Gangsta","Double OG","Triple OG","Co-Boss","Boss"},
{"Los Santos Police", POLICE_COLOR, 0, 0, 0, 0, 0, "Cadet","Officer","Sergeant","Inspector","Assistant Chief","Chief"},
{"Bad Boys", BADBOYS_COLOR, 0, 0, 0, 0, 0, "Gangster","Drug Dealer","Driver","Left Hand","Right Hand","Boss"},
{"Los Santos Army", COLOR_DARKGREEN, 0, 0, 0, 0, 0, "Private","Lieutenant","Captain","Major","Colonel","General"},
{"San Andreas Army Aviation", 0x62620040, 0, 0, 0, 0, 0, "Recruit","Soldier","Major","Captain","Commander","General"},
{"Biker Boys", COLOR_RED, 0, 0, 0, 0, 0, "Trainee biker","Rider","Biker","Left Hand","Right Hand","Boss"},
{"Jizzy's Club", COLOR_PINK, 0, 0, 0, 0, 0, "Messenger","Soldier","Manager","Left Hand","Right Hand","Jizzy"},
{"Las Venturas Bloods", 0xADAD303A, 0, 0, 0, 0, 0, "Gangsta","OG","Double OG","Left Hand","Right Hand","Boss"},
{"Asian Triads", 0xFF80003E, 0, 0, 0, 0, 0, "Dealer","Gangsta","OGangsta","Left Hand","Right Hand","Da Boss"},
{"Los Santos MIB Agents", 0x3AD18D76, 0, 0, 0, 0, 0, "New Agent","Agent","Special Agent","Secret Agent","MIB Agent","Professional Agent"},
{"Russian Mafia", 0x8000FF72, 0, 0, 0, 0, 0, "Driver","Gangster","Original Gangster","Left Hand","Co-Boss","BOSS"},
{"C.I.A", 0x4E00008B, 0, 0, 0, 0, 0, "Agent","Special Agent","Secret Agent","CIA Agent","Professional Agent","BOSS"},
{"FBI", 0x808080FF, 0, 0, 0, 0, 0, "Agent","Agent","Agent","Agent","Agent","Agent"}

}; //Line 303
Reply
#4

@samtey after "};" i have:
pawn Code:
enum tinfo
{
     turfID,
     turfName[ 40 ],
     cityName[ 40 ],
     Float:zMinX,
     Float:zMinY,
     Float:zMaxX,
     Float:zMaxY,
     TurfColor,
     TurfOwner,
     TurfAttacker,
     TurfKills,
     TurfAttackKills,
     TurfWarStarted,
     MIT
}
@Calg00ne I don't think so if I read it that will help me..
Reply
#5

Did u took away the ; ?

pawn Code:
new TeamInfo[MAX_TEAMS][gInfo]= {
{"Civilian", CIVILIAN_COLOR, 0, 0, 0, 0, 0, "None","None","None","None","City Manager","Mayor",},
{"Grove Street Families", GROVE_COLOR, 0, 0, 0, 0, 0, "Gangsta","Original Gangster","Double OG","Left Hand","Right Hand","Boss"},
{"Rolling Height Ballas", BALLA_COLOR, 0, 0, 0, 0, 0, "Trainee G","Original G","Gangsta","Left Hand","Right Hand","Boss"},
{"Los Santos Vagos", VAGOS_COLOR, 0, 0, 0, 0, 0, "Rank1","Rank2","Rank3","Rank4","Rank5","Leader"},
{"Varrio Los Aztecas", AZTECA_COLOR, 0, 0, 0, 0, 0, "Rank1","Rank2","Rank3","Rank4","Rank5","Leader"},
{"Italian Mafia", TRIAD_COLOR, 0, 0, 0, 0, 0, "Driver","Guard","Killer","Manager","Right Hand","Godfather"},
{"Japanese Yakuza", YAKUZA_COLOR, 0, 0, 0, 0, 0, "Rank1","Rank2","Rank3","Rank4","Rank5","Leader"},
{"Vinewood Cripz", CRIPZ_COLOR, 0, 0, 0, 0, 0, "Gangster","Professional Gangsta","Double OG","Triple OG","Co-Boss","Boss"},
{"Los Santos Police", POLICE_COLOR, 0, 0, 0, 0, 0, "Cadet","Officer","Sergeant","Inspector","Assistant Chief","Chief"},
{"Bad Boys", BADBOYS_COLOR, 0, 0, 0, 0, 0, "Gangster","Drug Dealer","Driver","Left Hand","Right Hand","Boss"},
{"Los Santos Army", COLOR_DARKGREEN, 0, 0, 0, 0, 0, "Private","Lieutenant","Captain","Major","Colonel","General"},
{"San Andreas Army Aviation", 0x62620040, 0, 0, 0, 0, 0, "Recruit","Soldier","Major","Captain","Commander","General"},
{"Biker Boys", COLOR_RED, 0, 0, 0, 0, 0, "Trainee biker","Rider","Biker","Left Hand","Right Hand","Boss"},
{"Jizzy's Club", COLOR_PINK, 0, 0, 0, 0, 0, "Messenger","Soldier","Manager","Left Hand","Right Hand","Jizzy"},
{"Las Venturas Bloods", 0xADAD303A, 0, 0, 0, 0, 0, "Gangsta","OG","Double OG","Left Hand","Right Hand","Boss"},
{"Asian Triads", 0xFF80003E, 0, 0, 0, 0, 0, "Dealer","Gangsta","OGangsta","Left Hand","Right Hand","Da Boss"},
{"Los Santos MIB Agents", 0x3AD18D76, 0, 0, 0, 0, 0, "New Agent","Agent","Special Agent","Secret Agent","MIB Agent","Professional Agent"},
{"Russian Mafia", 0x8000FF72, 0, 0, 0, 0, 0, "Driver","Gangster","Original Gangster","Left Hand","Co-Boss","BOSS"},
{"C.I.A", 0x4E00008B, 0, 0, 0, 0, 0, "Agent","Special Agent","Secret Agent","CIA Agent","Professional Agent","BOSS"},
{"FBI", 0x808080FF, 0, 0, 0, 0, 0, "Agent","Agent","Agent","Agent","Agent","Agent"}

}
FIRST try this!
Reply
#6

I tried it give me more 1 error
Reply
#7

Show me the error and a part after and before ur script above, okay?
Reply
#8

with ";"
pawn Code:
C:\Documents and Settings\R3dZerg\Desktop\gangwars4.pwn(303) : error 052: multi-dimensional arrays must be fully initialized
without ";"
pawn Code:
C:\Documents and Settings\R3dZerg\Desktop\gangwars4.pwn(303) : error 052: multi-dimensional arrays must be fully initialized
C:\Documents and Settings\R3dZerg\Desktop\gangwars4.pwn(304) : error 001: expected token: ";", but found "enum"
pawn Code:
enum tinfo //Line 304
{
     turfID,
     turfName[ 40 ],
     cityName[ 40 ],
     Float:zMinX,
     Float:zMinY,
     Float:zMaxX,
     Float:zMaxY,
     TurfColor,
     TurfOwner,
     TurfAttacker,
     TurfKills,
     TurfAttackKills,
     TurfWarStarted,
     MIT
}
Reply
#9

Place your enum before of all defined variables! Or before the variables which u need for enum!
Reply
#10

before:
pawn Code:
enum gInfo
{
    TeamName[64],
    TeamColor,
    TurfWarsWon,
    TurfWarsLost,
    RivalsKilled,
    HomiesDied,
    TeamScore,
    fRank1[256],
    fRank2[256],
    fRank3[256],
    fRank4[256],
    fRank5[256],
    fRank6[256]
}
after:
pawn Code:
enum tinfo
{
     turfID,
     turfName[ 40 ],
     cityName[ 40 ],
     Float:zMinX,
     Float:zMinY,
     Float:zMaxX,
     Float:zMaxY,
     TurfColor,
     TurfOwner,
     TurfAttacker,
     TurfKills,
     TurfAttackKills,
     TurfWarStarted,
     MIT
}
Reply
#11

Lol, u didn't understand! I mean: Both ur enums: PLACE THEM BEFORE ALL DEFINED VARIABLES!!
Reply
#12

Oh lord.. I believe 32 cells would be enough
Код:
fRank1[32],
fRank2[32],
fRank3[32],
fRank4[32],
fRank5[32],
fRank6[32]
And remove useless comma to fix the error
Код:
..."None","City Manager","Mayor",},
Reply
#13

YJIET I tried this but again
pawn Код:
C:\Documents and Settings\R3dZerg\Desktop\gangwars4.pwn(303) : error 052: multi-dimensional arrays must be fully initialized
ah @samtey i really don't understand I'm newbie if you wanna give me skype,msn or maybe email on private message I will send you the script to see
Reply
#14

samtey, don't talk shit. That ';' is NEEDED there.
Read the manual, and you'll see where is your problem.
(MAX_TEAMS Should be set to 20).
Reply
#15

set MAX_TEAMS to 20. If that won't help, then I'm useless.
Reply
#16

YJIET then how must looks the code?
Reply
#17

Like this
pawn Код:
#define MAX_TEAMS 20
Reply
#18

yeah it works ! THANKS A LOT ! i give you rep !
Reply
#19

I actually noticed that wups said it before me but no problem
Reply
#20

I gave him too rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)