#define MAX_ZONES 6
enum dZones
{
Name[128],
Float:MinX,
Float:MinY,
Float:MaxX,
Float:MaxY,
Float:Z,
Team,
ID
}
new Zones[MAX_ZONES][dZones] =
{
{"Soviet Union Base", 1.0, 1.0, 1.0, 1.0, 20.0, -1, 0},
{"Germany Base", 1.0, 1.0, 1.0, 1.0, 20.0, -1, 0},
{"United States Base", 1.0, 1.0, 1.0, 1.0, 20.0, -1, 0},
{"Great Britain Base", 1.0, 1.0, 1.0, 1.0, 20.0, -1, 0},
{"Test Gangzone", 19.532827, 2013.186401, 67.532829, 2061.186523, 234, -1, 0} // error line
}; //error line
C:\Users\TheSimpleGuy\Desktop\SA-MP Server\gamemodes\wfr.pwn(62) : warning 213: tag mismatch C:\Users\TheSimpleGuy\Desktop\SA-MP Server\gamemodes\wfr.pwn(63) : error 052: multi-dimensional arrays must be fully initialized
|
You say the array has to have 6 elements and you put only 5. Hence, error. What you should do is remove the MAX_ZONES define and let the compiler set the size. In loops, use sizeof.
|
enum dZones
{
Name[128],
Float:MinX,
Float:MinY,
Float:MaxX,
Float:MaxY,
Float:Z,
Team,
ID
}
new Zones[][dZones] =
{
{"Soviet Union Base", 1.0, 1.0, 1.0, 1.0, 20.0, -1, 0},
{"Germany Base", 1.0, 1.0, 1.0, 1.0, 20.0, -1, 0},
{"United States Base", 1.0, 1.0, 1.0, 1.0, 20.0, -1, 0},
{"Great Britain Base", 1.0, 1.0, 1.0, 1.0, 20.0, -1, 0},
{"Test Gangzone", 19.532827, 2013.186401, 67.532829, 2061.186523, 234, -1, 0}
};
|
Thank you! But now, I don't understand, my line 62 is still on its error, "tag mismatch". My parameters were correct, right?
![]() |
{"Test Gangzone", 19.532827, 2013.186401, 67.532829, 2061.186523, 234, -1, 0}
{"Test Gangzone", 19.532827, 2013.186401, 67.532829, 2061.186523, 234.0, -1, 0}