Warning 228
#1

I've never encountered this warning before, so I'm kinda new to it.

Warning
Код:
warning 228: length of initialler exceeds size of the enum field
Line
Код:
{1, "San Fierro Bridge 1",30,{-1390.5225,682.1913,3.0703,213.8279},{-1391.7262,681.3531,3.0703,217.9710},{-1390.5225,682.1913,3.0703,213.8279},{-1394.5006,679.6263,3.0703,213.0607}},
Full Code
PHP код:
enum mInfo
{
    
MapID,
    
MapName[50],
    
MapCapacity,
    
MapPosition[3],
    
MapPosition1[3],
    
MapPosition2[3],
    
MapPosition3[3]
};
static const 
MapArenas[20][mInfo] = {
    {
1"San Fierro Bridge 1",30,{-1390.5225,682.1913,3.0703,213.8279},{-1391.7262,681.3531,3.0703,217.9710},{-1390.5225,682.1913,3.0703,213.8279},{-1394.5006,679.6263,3.0703,213.0607}},
    {
2"San Fierro Bridge 2",30,{-1378.4370,660.6683,3.0703,33.2575},{-1379.8799,659.6663,3.0703,33.3061},{-1376.6002,662.1080,3.0703,34.9597},{-1374.9482,663.3660,3.0703,35.4194}},
    {
3"RC Duel Side 1",30,{-1129.1080,1057.8196,1346.4141,268.8520},{-1130.3761,1057.7695,1346.4141,269.3449},{-1131.9648,1057.7135,1346.4131,269.3604},{-1133.2118,1057.7186,1346.4073,267.7111}},
    {
4"RC Duel Side 2",30,{-976.5330,1061.0974,1345.6719,90.8765},{-975.3851,1061.1461,1345.6719,89.6650},{-974.2819,1061.1687,1345.6750,88.3539},{-973.0425,1061.1637,1345.6703,87.3878}},
    {
5"Ghost Town Side 1",30,{-373.7936,2191.6714,42.0549,13.9818},{-372.0316,2192.1499,42.0721,9.4363},{-371.5961,2189.2510,42.0656,5.1673},{-373.6276,2188.9592,42.0250,9.1356}},
    {
6"Ghost Town Side 2",30,{-389.9332,2266.9065,41.5028,192.2548},{-392.1810,2266.3997,41.5043,191.5937},{-392.9043,2269.7659,41.3142,193.2141},{-390.6395,2270.0854,41.3204,193.6031}},
    {
7"Area 69 Side 1",30,{244.4785,1859.0291,14.0840,358.2156},{245.5221,1859.1381,14.0840,358.5958},{246.8445,1859.1646,14.0840,2.1794},{247.9871,1859.2629,14.0840,0.4107}},
    {
8"Area 69 Side 2",30,{282.0305,1870.2943,8.7578,266.4510},{282.0993,1869.3051,8.7578,265.3987},{282.1519,1868.4772,8.7578,267.9874},{282.3145,1867.7375,8.7578,272.3645}},
    {
9"Jefferson Motel Side 1",30,{2219.9172,-1150.3457,1025.7969,358.0954},{2221.1750,-1150.2476,1025.7969,359.9148},{2222.5779,-1150.1844,1025.7969,358.5905},{2224.0005,-1150.1429,1025.7969,358.7651}},
    {
10"Jefferson Motel Side 2",30,{2194.4265,-1141.7477,1029.7969,178.4772},{2193.2834,-1141.8184,1029.7969,177.9686},{2192.3474,-1141.9075,1029.7969,176.5051},{2191.2817,-1142.0076,1029.7969,182.0452}},
    {
11"LVPD Office Side 1",30,{201.7343,168.9637,1003.0234,269.7014},{201.7796,167.5886,1003.0234,266.6063},{201.7849,165.5426,1003.0234,269.2347},{201.7534,171.0489,1003.0234,266.0070}},
    {
12"LVPD Office Side 2",30,{288.5088,176.6408,1007.1794,88.8833},{288.4682,178.5188,1007.1794,87.0085},{288.3854,180.6830,1007.1794,93.0195},{288.2247,183.0268,1007.1794,89.8581}},
    {
13"Blood Bowl Side 1",30,{-1366.0027,998.4883,1024.0945,87.3901},{-1366.0214,1000.4103,1024.1296,88.7054},{-1366.0740,996.3983,1024.0662,87.0031},{-1366.2365,994.0324,1024.0276,85.2875}},
    {
14"Blood Bowl Side 2",30,{-1408.0867,998.9529,1024.1791,263.8105},{-1408.0472,997.1901,1024.1448,268.0109},{-1407.9194,995.0812,1024.1083,268.1656},{-1407.0100,1002.6795,1024.2368,260.2687}},
    {
15"MaddDog's Side 1",30,{1226.4816,-813.4647,1084.0078,178.6077},{1226.4738,-811.8139,1084.0078,179.0410},{1226.4543,-810.1635,1084.0078,180.3232},{1226.4458,-808.1323,1084.0078,177.5133}},
    {
16"MaddDog's Side 2",30,{1282.1765,-782.9517,1089.9375,176.6909},{1282.1992,-781.8889,1089.9375,177.3695},{1282.2159,-780.9387,1089.9375,178.8197},{1282.2312,-779.8137,1089.9375,178.5234}},
    {
17"Warehouse Side 1",30,{1377.0428,-26.0091,1000.9264,272.4230},{1377.0511,-23.7405,1000.9264,269.9579},{1377.0461,-21.4430,1000.9264,268.2357},{1377.5198,-27.6079,1000.9261,269.8827}},
    {
18"Warehouse Side 2",30,{1411.0859,-25.6475,1000.9236,87.0464},{1411.0845,-27.9166,1000.9236,87.9174},{1411.0293,-23.3423,1000.9236,89.6108},{1411.0293,-23.3423,1000.9236,89.6108}},
    {
19"Crack Den Side 1",30,{2536.8643,-1285.2515,1054.6406,179.8188},{2535.4216,-1285.3030,1054.6406,179.7413},{2535.4492,-1282.9037,1054.6406,177.1037},{2537.5259,-1283.0725,1054.6406,174.9438}},
    {
20"Crack Den Side 2",30,{2550.3254,-1291.7980,1060.9844,358.7863},{2551.9651,-1291.7819,1060.9844,358.8016},{2551.8599,-1293.6301,1060.9844,355.0433},{2549.8979,-1293.4083,1060.9844,354.5480}}
}; 
EDIT: Forgot to add the place where I use the array

PHP код:
/*new str[750],string[200];
    for(new i=0;i<sizeof(MapArenas);i++)
    {
        format(string, sizeof(string), "%d\t%s\t%d\t%d\n",MapArenas[i][MapID],MapArenas[i][MapName],mapplayers[i],MapArenas[MapCapacity]);
        strcat(str, string);
    }*/ 
Reply
#2

placed in edit to avoid double post
Reply
#3

MapPos size is 3. You have 4 coordinates.
Reply
#4

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
MapPos size is 3. You have 4 coordinates.
That worked, thanks! Now I only have one problem
Код:
warning 213: tag mismatch
Код:
{-1390.5225,682.1913,3.0703,213.8279}
There's a bunch of these, all the same warnings.
Reply
#5

Forgot to place Float:

All fixed, thanks!
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)