[Need Help] Error
#1

I have this error:

Код:
C:\Documents and Settings\Eigenaar\Bureaublad\LVRPG\gamemodes\LSTW2Uv1.pwn(98) : error 052: multi-dimensional arrays must be fully initialized
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
lines:

Код:
new TeamInfo[ MAX_TEAMS ][ teaminfo ]= {
{ "Varrio Los Aztecas", AZTECAS_COLOR, 0, 0, 0, 0, 0},
{ "Los Santos Vagos",  VAGOS_COLOR,  0, 0, 0, 0, 0},
{ "The Ballas Family",  BALLAS_COLOR,  0, 0, 0, 0, 0},
{ "Grove Street Familie",  GROVE_COLOR,  0, 0, 0, 0, 0},
{ "Los Santos Police Department",   COPS_COLOR,   0, 0, 0, 0, 0}
};code]
Reply
#2

Remove the comma from the last line in the array.

pawn Код:
new TeamInfo[ MAX_TEAMS ][ teaminfo ]= {
{ "Varrio Los Aztecas", AZTECAS_COLOR, 0, 0, 0, 0, 0},
{ "Los Santos Vagos",  VAGOS_COLOR,  0, 0, 0, 0, 0},
{ "The Ballas Family",  BALLAS_COLOR,  0, 0, 0, 0, 0},
{ "Grove Street Familie",  GROVE_COLOR,  0, 0, 0, 0, 0},
{ "Los Santos Police Department",   COPS_COLOR,   0, 0, 0, 0, 0}
};
Reply
#3

Quote:
Originally Posted by //exora
Remove the comma from the last line in the array.

pawn Код:
new TeamInfo[ MAX_TEAMS ][ teaminfo ]= {
{ "Varrio Los Aztecas", AZTECAS_COLOR, 0, 0, 0, 0, 0},
{ "Los Santos Vagos",  VAGOS_COLOR,  0, 0, 0, 0, 0},
{ "The Ballas Family", BALLAS_COLOR, 0, 0, 0, 0, 0},
{ "Grove Street Familie", GROVE_COLOR,  0, 0, 0, 0, 0},
{ "Los Santos Police Department",  COPS_COLOR,  0, 0, 0, 0, 0}
};
I still got another error see first post
Reply
#4

PLEAS HELP!!!!
Reply
#5

Show line 98
Reply
#6

92:new TeamInfo[ MAX_TEAMS ][ teaminfo ]= {
93:{ "Varrio Los Aztecas", AZTECAS_COLOR, 0, 0, 0, 0, 0},
94:{ "Los Santos Vagos", VAGOS_COLOR, 0, 0, 0, 0, 0},
95:{ "The Ballas Family", BALLAS_COLOR, 0, 0, 0, 0, 0},
96: { "Grove Street Familie", GROVE_COLOR, 0, 0, 0, 0, 0},
97: { "Los Santos Police Department", COPS_COLOR, 0, 0, 0, 0, 0}
98: };
Reply
#7

Try and remove the ; from };
Reply
#8

Get this errors:
Код:
C:\Documents and Settings\Eigenaar\Bureaublad\LVRPG\gamemodes\LSTW2Uv1.pwn(98) : error 052: multi-dimensional arrays must be fully initialized
C:\Documents and Settings\Eigenaar\Bureaublad\LVRPG\gamemodes\LSTW2Uv1.pwn(103) : error 001: expected token: ";", but found "enum"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#9

HELP!
Reply
#10

pawn Код:
#define MAX_TEAMS  5

Test FilterScript:
pawn Код:
#include <a_samp>

#define MAX_TEAMS  5
#define AZTECAS_COLOR   0x0066FFAA
#define VAGOS_COLOR     0x0066FFAA
#define BALLAS_COLOR    0x0066FFAA
#define GROVE_COLOR     0x0066FFAA
#define COPS_COLOR      0x0066FFAA

enum teaminfo
{
    blabla[32],
    teamcolor,
    num1,
    num2,
    num3,
    num4,
    num5,
};

new TeamInfo[MAX_TEAMS][teaminfo] =
{
    { "Varrio Los Aztecas", AZTECAS_COLOR, 0, 0, 0, 0, 0}, // Team 1
    { "Los Santos Vagos",  VAGOS_COLOR,  0, 0, 0, 0, 0}, // Team 2
    { "The Ballas Family",  BALLAS_COLOR,  0, 0, 0, 0, 0}, // Team 3
    { "Grove Street Familie",  GROVE_COLOR,  0, 0, 0, 0, 0}, // Team 4
    { "Los Santos Police Department",   COPS_COLOR,   0, 0, 0, 0, 0} // Team 5
};

public OnFilterScriptInit()
{
    print("\n");
    for(new i; i < sizeof TeamInfo; i++)
    {
        printf("    %s | %x | %d | %d | %d | %d | %d |", TeamInfo[i][blabla], TeamInfo[i][teamcolor], TeamInfo[i][num1], TeamInfo[i][num2], TeamInfo[i][num3], TeamInfo[i][num4], TeamInfo[i][num5]);
    }
    print("\n");
    return 1;
}
pawn Код:
#define MAX_TEAMS  6

// : error 052: multi-dimensional arrays must be fully initialized
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)