error 052
#1

can some one help me with this error tried already everything but havent found anything

this is the whole error
PHP код:
C:\XX\XX\XX\XX.pwn(117) : error 052multi-dimensional arrays must be fully initialized 
this is the code
PHP код:
new TeamInfoMAX_TEAMS ][ teaminfo ]= {
// LS teams
"Aztecas",   AZTECA_COLOR,   00000},
"Vagos",     VAGOS_COLOR,    00000},
"Ballas",    BALLA_COLOR,    00000},
"Grove",    GROVE_COLOR,    00000},
"Hoodlums",  HOODLUM_COLOR,  00000},
"Cops",      COP_COLOR,      00000}
}; 
//this is the line 117 
Reply
#2

Quote:
Originally Posted by sl!x
Посмотреть сообщение
can some one help me with this error tried already everything but havent found anything

this is the whole error
PHP код:
C:\XX\XX\XX\XX.pwn(117) : error 052multi-dimensional arrays must be fully initialized 
this is the code
PHP код:
new TeamInfoMAX_TEAMS ][ teaminfo ]= {
// LS teams
"Aztecas",   AZTECA_COLOR,   00000},
"Vagos",     VAGOS_COLOR,    00000},
"Ballas",    BALLA_COLOR,    00000},
"Grove",    GROVE_COLOR,    00000},
"Hoodlums",  HOODLUM_COLOR,  00000},
"Cops",      COP_COLOR,      00000}
}; 
//this is the line 117 
Try putting
pawn Код:
( "Aztecas",   AZTECA_COLOR,   0, 0, 0, 0, 0),
( "Vagos",     VAGOS_COLOR,    0, 0, 0, 0, 0),
( "Ballas",    BALLA_COLOR,    0, 0, 0, 0, 0),
( "Grove",    GROVE_COLOR,    0, 0, 0, 0, 0),
( "Hoodlums",  HOODLUM_COLOR,  0, 0, 0, 0, 0),
( "Cops",      COP_COLOR,      0, 0, 0, 0, 0)
} indicates the end.
Reply
#3

i did it like this but again the same error
PHP код:
new TeamInfoMAX_TEAMS ][ teaminfo ]= {
"Aztecas",   AZTECA_COLOR,   00000),
"Vagos",     VAGOS_COLOR,    00000),
"Ballas",    BALLA_COLOR,    00000),
"Grove",    GROVE_COLOR,    00000),
"Hoodlums",  HOODLUM_COLOR,  00000),
"Cops",      COP_COLOR,      00000)
}; 
PHP код:
C:\XX\XX\XX\XX.pwn(117) : error 052multi-dimensional arrays must be fully initialized 
Reply
#4

Quote:
Originally Posted by sl!x
Посмотреть сообщение
i did it like this but again the same error
PHP код:
new TeamInfoMAX_TEAMS ][ teaminfo ]= {
"Aztecas",   AZTECA_COLOR,   00000),
"Vagos",     VAGOS_COLOR,    00000),
"Ballas",    BALLA_COLOR,    00000),
"Grove",    GROVE_COLOR,    00000),
"Hoodlums",  HOODLUM_COLOR,  00000),
"Cops",      COP_COLOR,      00000)
}; 
PHP код:
C:\XX\XX\XX\XX.pwn(117) : error 052multi-dimensional arrays must be fully initialized 
pawn Код:
new TeamInfo[ MAX_TEAMS ][ teaminfo ]= {
take out the =
Reply
#5

now i get two errors
PHP код:
C:\XX\XX\XX\XX.pwn(110) : error 001expected token";"but found "{"
C:\XX\XX\XX\XX.pwn(117) : error 010invalid function or declaration 
PHP код:
new TeamInfoMAX_TEAMS ][ teaminfo ] { //line 110
"Aztecas",   AZTECA_COLOR,   00000),
"Vagos",     VAGOS_COLOR,    00000),
"Ballas",    BALLA_COLOR,    00000),
"Grove",    GROVE_COLOR,    00000),
"Hoodlums",  HOODLUM_COLOR,  00000),
"Cops",      COP_COLOR,      00000)
}; 
//117 
Reply
#6

MAX_TEAMS should be defined as 6. And keep it as you had it in your first post.

@Brandondw8: Curly brackets and Equals sign are needed.
Reply
#7

Quote:
Originally Posted by sl!x
Посмотреть сообщение
now i get two errors
PHP код:
C:\XX\XX\XX\XX.pwn(110) : error 001expected token";"but found "{"
C:\XX\XX\XX\XX.pwn(117) : error 010invalid function or declaration 
PHP код:
new TeamInfoMAX_TEAMS ][ teaminfo ] { //line 110
"Aztecas",   AZTECA_COLOR,   00000),
"Vagos",     VAGOS_COLOR,    00000),
"Ballas",    BALLA_COLOR,    00000),
"Grove",    GROVE_COLOR,    00000),
"Hoodlums",  HOODLUM_COLOR,  00000),
"Cops",      COP_COLOR,      00000)
}; 
//117 
pawn Код:
new TeamInfo[ MAX_TEAMS ][ teaminfo ] = {
AZTECA_COLOR,VAGOS_COLOR, BALLA_COLOR,GROVE_COLOR, HOODLUM_COLOR,COP_COLOR
}; //117
And youd have to add on top
#define AZTECA_COLOR then whatever the hex is.

Edit:
Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
MAX_TEAMS should be defined as 6. And keep it as you had it in your first post.

@Brandondw8: Curly brackets and Equals sign are needed.
This is an educated guess going off a new PlayerColors[200] = { i have
Reply
#8

@kostantinos yours worked perfeclty but thank you both for helping will rep you both
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)