[Problem] "initialization data exceeds declared size" -
ScriptColor - 18.03.2013
Hello,
I am a coder in the French section.
If I come to post my problem here, it is because in the French section person was not able to help me.
I hope I can move forward as quickly as possible because the problem prevents me any continuation.
pawn Код:
#define NB_TEAMS 5
enum InfoTeam
{
teamname[20],
NbPlayers = 0,
Float:Spawn[4],
};
new TeamInfo[NB_TEAMS][InfoTeam] =
{
{"LSPD", 0, {1.0, 2.0, 3.0, 4.0}},
{"Vagos", 0, {0.0, 0.0, 0.0, 0.0}},
{"Aztecas", 0, {0.0, 0.0, 0.0, 0.0}},
{"Ballas", 0, {0.0, 0.0, 0.0, 0.0}},
{"Groove", 0, {0.0, 0.0, 0.0, 0.0}}
};
Respuesta: [Problem] "initialization data exceeds declared size" -
Parka - 18.03.2013
NB_TEAMS and InfoTeam
Re : Respuesta: [Problem] "initialization data exceeds declared size" -
ScriptColor - 18.03.2013
Quote:
Originally Posted by cesar_******
NB_TEAMS and InfoTeam
|
Sorry,
pawn Код:
#define NB_TEAMS 5
enum InfoTeam
{
teamname[20],
NbPlayers = 0,
Float:Spawn[4],
};
Re: [Problem] "initialization data exceeds declared size" -
Misiur - 18.03.2013
Enums don't work like that! You are overwriting first character of teamname with NbPlayers.
pawn Код:
enum InfoTeam
{
teamname[20],
NbPlayers,
Float:Spawn[4]
};
@down: don't forget about unnecessary comma after last element
Respuesta: [Problem] "initialization data exceeds declared size" -
Parka - 18.03.2013
pawn Код:
#define NB_TEAMS 5
enum InfoTeam
{
teamname[20],
NbPlayers,/// problem repaired
Float:Spawn[4],
};
new TeamInfo[NB_TEAMS][InfoTeam] =
{
{"LSPD", 0, {1.0, 2.0, 3.0, 4.0}},
{"Vagos", 0, {0.0, 0.0, 0.0, 0.0}},
{"Aztecas", 0, {0.0, 0.0, 0.0, 0.0}},
{"Ballas", 0, {0.0, 0.0, 0.0, 0.0}},
{"Groove", 0, {0.0, 0.0, 0.0, 0.0}}
};
Re: Respuesta: [Problem] "initialization data exceeds declared size" -
Denying - 18.03.2013
pawn Код:
enum InfoTeam
{
teamname[20],
NbPlayers,
Float:Spawn[4],
};
new TeamInfo[teamname/NbPlayers/Spawn][InfoTeam] =
{
{"LSPD", 0, {1.0, 2.0, 3.0, 4.0}},
{"Vagos", 0, {0.0, 0.0, 0.0, 0.0}},
{"Aztecas", 0, {0.0, 0.0, 0.0, 0.0}},
{"Ballas", 0, {0.0, 0.0, 0.0, 0.0}},
{"Groove", 0, {0.0, 0.0, 0.0, 0.0}}
};
Try. ( You need to choose one of the following "teamname" or "NbPlayers" or "Spawn" wherever it is written "teamname/NbPlayers/Spawn" )
Re : [Problem] "initialization data exceeds declared size" -
ScriptColor - 18.03.2013
Very Thanx !