Fehler im ENUM

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hey Leute, ich habe heute an meinem Script etwas an meinem Enum gearbeitet und dann kamem beim compilen plötzlich so welche Warnings, den ich nicht so kenne.
    Ich habe das mit den APNamen hinzugefügt und später automatisch Textlabels zu erstellen.



    Warnungsmeldung:

    Zeile 2363 bis 2419
    warning 228: length of initialler exceeds size of the enum field


    Enum



    enum APInfo
    {
    APVirtualWorld,
    APInterior,
    Float:APEingangX,
    Float:APEingangY,
    Float:APEingangZ,
    Float:APAusgangX,
    Float:APAusgangY,
    Float:APAusgangZ,
    APLocation,
    APEingangPickup,
    APAusgangPickup,
    APName[256],
    };


    Code

    new AutomatikPortInfo[54][APInfo] =
    {
    {0,15,1456.3677,-1137.7054,23.9486,207.6253,-110.9604,1005.1328,2,"Kleidergeschäft"}, // Kleidergeschäft
    {0,9,928.6076,-1352.9957,13.4,364.9345,-11.3835,1001.8516,2,"Cluckin' Bell"}, // Cluckin Bell nähe OAmt
    {1,10,810.7647,-1616.1702,13.5469,363.4129,-74.5786,1001.5078,4,"Burgershot Los Santos"}, // Burger Shot LS
    {2,10,-2336.5752,-166.8304,35.5547,363.4129,-74.5786,1001.5078,5,"Burgershot San Fierro"}, // Burger Shot SF
    {3,10,-2356.3708,1008.1512,50.8984,363.4129,-74.5786,1001.5078,6,"Burgershot San Fierro"}, // Burger Shot SF
    .
    .
    .
    {1,1,461.3346,-1500.7125,31.0606,226.293991,-7.431529,1002.210937,5,"Victim"}, //Victim
    {1,1,2112.6941,-1211.5792,23.9630,203.777999,-48.492397,1001.804687,1,"Suburban"}, //Suburban
    {1,1,453.5518,-1478.0765,30.8104,204.332992,-166.694992,1000.523437,14,"Didier Sachs"}, //Didier Sachs
    {0,18,1411.6747,-1699.6981,13.5395, 1700.5880,-1667.8499,20.2188,72,"Hotel Los Santos"} // Hotel
    };


    Was kann dort der Fehler sein?



    Mit freundlichen Grüßen,
    Voxa

  • das


    zu

    Mit Freundlichen Grüßen
    Whitetiiger aka. Kaito-sensei
    P.s. Alle mit #IRONIE bestätigten Sätze von mir, sind als Ironie anzusehen.

  • auch von denn Neuen?
    P.s. in einer Zeile hast du nur 10 Angaben, jedoch brauchst du 12

    PHP
    {0,15,1456.3677,-1137.7054,23.9486,207.6253,-110.9604,1005.1328,2,"Kleidergeschäft"}

    Mit Freundlichen Grüßen
    Whitetiiger aka. Kaito-sensei
    P.s. Alle mit #IRONIE bestätigten Sätze von mir, sind als Ironie anzusehen.

  • Die werden woanders benutzt o.o



    for(new h = 0; h < sizeof(AutomatikPortInfo); h++)
    {
    format(string2, sizeof(string2), "{FFFFFF}Willkommen am\n"#SERVERFARBE"[{FFFFFF}%s"#SERVERFARBE"]",AutomatikPortInfo[h][APName]);
    Create3DTextLabel(string2,COLOR_WHITE,AutomatikPortInfo[h][APEingangX],AutomatikPortInfo[h][APEingangY],AutomatikPortInfo[h][APEingangZ]+1.0,15.0,0,0);
    AutomatikPortInfo[h][APAusgangPickup] = CreatePickup(1239, 23, AutomatikPortInfo[h][APAusgangX], AutomatikPortInfo[h][APAusgangY], AutomatikPortInfo[h][APAusgangZ],-1);
    AutomatikPortInfo[h][APEingangPickup] = CreatePickup(1239, 23, AutomatikPortInfo[h][APEingangX], AutomatikPortInfo[h][APEingangY], AutomatikPortInfo[h][APEingangZ]+0.2,-1);
    }


  • Warum hat APName die Größe von 256?
    Ist das nicht ein wenig Groß? 32-64 reichen vollkommen aus.
    Das Semicolon würde ich ebenfalls weglassen im Enum.


    new AutomatikPortInfo[54][APInfo] =
    {
    {0,15,1456.3677,-1137.7054,23.9486,207.6253,-110.9604,1005.1328,2,"Kleidergeschäft"}, // Kleidergeschäft
    {0,9,928.6076,-1352.9957,13.4,364.9345,-11.3835,1001.8516,2,"Cluckin' Bell"}, // Cluckin Bell nähe OAmt
    {1,10,810.7647,-1616.1702,13.5469,363.4129,-74.5786,1001.5078,4,"Burgershot Los Santos"}, // Burger Shot LS
    {2,10,-2336.5752,-166.8304,35.5547,363.4129,-74.5786,1001.5078,5,"Burgershot San Fierro"}, // Burger Shot SF
    {3,10,-2356.3708,1008.1512,50.8984,363.4129,-74.5786,1001.5078,6,"Burgershot San Fierro"}, // Burger Shot SF
    .
    .
    .
    {1,1,461.3346,-1500.7125,31.0606,226.293991,-7.431529,1002.210937,5,"Victim"}, //Victim
    {1,1,2112.6941,-1211.5792,23.9630,203.777999,-48.492397,1001.804687,1,"Suburban"}, //Suburban
    {1,1,453.5518,-1478.0765,30.8104,204.332992,-166.694992,1000.523437,14,"Didier Sachs"}, //Didier Sachs
    {0,18,1411.6747,-1699.6981,13.5395, 1700.5880,-1667.8499,20.2188,72,"Hotel Los Santos"} // Hotel
    };


    Warum stehen dort an 3 Stellen nur ein "."? o.o

  • Weil da viel mehr ist ^^


    Hier ist alles:

    new AutomatikPortInfo[54][APInfo] =
    {
    {0,15,1456.3677,-1137.7054,23.9486,207.6253,-110.9604,1005.1328,2,"Kleidergeschäft"}, // Kleidergeschäft
    {0,9,928.6076,-1352.9957,13.4,364.9345,-11.3835,1001.8516,2,"Cluckin' Bell"}, // Cluckin Bell nähe OAmt
    //{0,10,1199.3916,-918.5089,43.1195,363.4129,-74.5786,1001.5078,3}, // BSN
    {1,10,810.7647,-1616.1702,13.5469,363.4129,-74.5786,1001.5078,4,"Burgershot Los Santos"}, // Burger Shot LS
    {2,10,-2336.5752,-166.8304,35.5547,363.4129,-74.5786,1001.5078,5,"Burgershot San Fierro"}, // Burger Shot SF
    {3,10,-2356.3708,1008.1512,50.8984,363.4129,-74.5786,1001.5078,6,"Burgershot San Fierro"}, // Burger Shot SF
    {4,10,-1912.1459,828.1643,35.2099,363.4129,-74.5786,1001.5078,7,"Burgershot San Fierro"}, // Burger Shot SF
    {5,10,2472.4783,2034.2706,11.0625,363.4129,-74.5786,1001.5078,8,"Burgershot Las Venturas"}, // Buger Shot LV
    {6,10,1872.7205,2071.8374,11.0625,363.4129,-74.5786,1001.5078,8,"Burgershot Las Venturas"}, // Buger Shot LV
    {7,10,2169.8044,2795.8225,10.8203,363.4129,-74.5786,1001.5078,11,"Burgershot Las Venturas"}, // Burger Shot LV
    {8,10,2366.7588,2071.1653,10.8203,363.4129,-74.5786,1001.5078,11,"Burgershot Las Venturas"}, // Burger Shot LV
    {1,9,-2671.4756,258.3460,4.6328,364.9345,-11.3835,1001.8516,12,"Cluckin' Bell"}, // Cluckin' Bell SF
    {2,9,-1213.6775,1830.3782,41.9297,364.9345,-11.3835,1001.8516,12,"Cluckin' Bell"}, // Cluckin' Bell LV
    {3,9,172.5735,1176.4569,14.7645,364.9345,-11.3835,1001.8516,13,"Cluckin' Bell"}, // Cluckin' Bell LV
    {4,9,-2154.9626,-2460.3972,30.8516,364.9345,-11.3835,1001.8516,14,"Cluckin' Bell"}, // Cluckin' Bell SF
    {5,9,2398.6084,-1898.6135,13.5469,364.9345,-11.3835,1001.8516,14,"Cluckin' Bell"}, // Cluckin' Bell LS
    {6,9,2420.1980,-1509.0193,24.0000,364.9345,-11.3835,1001.8516,16,"Cluckin' Bell"}, // Cluckin' Bell LS
    {7,9,2637.7461,1671.9392,11.0234,364.9345,-11.3835,1001.8516,17,"Cluckin' Bell"}, // Cluckin' Bell LV
    {8,9,2393.2983,2041.8185,10.8203,364.9345,-11.3835,1001.8516,18,"Cluckin' Bell"}, // Cluckin' Bell LV
    {9,9,2102.5400,2228.8660,11.0234,364.9345,-11.3835,1001.8516,19,"Cluckin' Bell"}, // Cluckin' Bell LV
    {10,9,-1816.5376,617.9418,35.1719,364.9345,-11.3835,1001.8516,20,"Cluckin' Bell"}, // Cluckin' Bell SF
    {0,5,202.7070,-202.3692,1.5781,372.4088,-132.9822,1001.4922,21,"Pizza Stack"}, // Pizza Stack LS
    {1,5,1367.0803,248.5499,19.5669,372.4088,-132.9822,1001.4922,22,"Pizza Stack"}, // Pizza Stack LS
    {2,5,2332.5308,74.8778,26.6210,372.4088,-132.9822,1001.4922,23,"Pizza Stack"}, // Pizza Stack LS
    {3,5,-1721.6688,1359.7571,7.1853,372.4088,-132.9822,1001.4922,24,"Pizza Stack"}, // Pizza Stack SF
    {4,5,-1808.3754,945.4438,24.8906,372.4088,-132.9822,1001.4922,25,"Pizza Stack"}, // Pizza Stack SF
    {5,5,2104.7798,-1806.5020,13.5547,372.4088,-132.9822,1001.4922,26,"Pizza Stack"}, // Pizza Stack LS
    {6,5,2351.7793,2533.2798,10.8203,372.4088,-132.9822,1001.4922,27,"Pizza Stack"}, // Pizza Stack LV
    {7,5,2083.3362,2224.1030,11.0234,372.4088,-132.9822,1001.4922,28,"Pizza Stack"}, // Pizza Stack LV
    {0,5,2229.6704,-1721.4871,13.5634,772.3214,-4.9251,1000.7288,29,"Grove Street GYM"}, // Grove Street Gym
    {0,18,1315.3887,-899.2028,39.5781,-31.0033,-91.5368,1003.5600,30,"24/7 Laden"}, // 27/7 BSN
    {1,18,1352.3188,-1758.0621,13.5078,-31.0033,-91.5368,1003.5600,31,"24/7 Laden"}, // 24/7 LSPD
    {2,18,1000.1430,-919.9896,42.7000,-31.0033,-91.5368,1003.5600,32,"24/7 Laden"}, // 24/7 BSN Tanke
    {0,6,1555.1205, -1675.6710, 16.1953,246.7282, 62.7136, 1003.6406,-1,"Los Santos Police Dept."},//LSPD
    {0,3,-1605.5012,710.7552,13.8672,288.6994,167.3778,1007.1719,-1,"San Fierro Police Dept."},//SFPD
    //{1,0,595.4757,-1250.1545,18.2764,2305.3269,-16.0568,26.7422,36,"Arbeitsamt"},//Arbeitsamt
    {1,0,1310.1266,-1367.8123,13.5408,2305.3269,-16.0568,26.7422,36,"Arbeitsamt"},//Arbeitsamt
    {2,3,1631.9034,-1172.0419,24.0781,834.0005,7.3860,1004.1797,37,"Los Santos Werbungspunkt"},//LS /ad Point
    {3,3,-2242.5676,128.7393,35.3203,834.0005,7.3860,1004.1797,38,"San Fierro Werbungspunkt"},//SF /ad Point
    {0,0,2239.1157,2429.7532,3.2734,2278.0969,2459.6187,38.6837,-1,"Las Venturas Heliport"}, //LV Heliport
    {40,18,-2160.8149,578.6754,35.1719,-31.0033,-91.5368,1003.5600,40,"24/7 Laden"},// 24/7 SF
    {41,18,-1675.7678,431.7322,7.1797,-31.0033,-91.5368,1003.5600,41,"24/7 Laden"},// 24/7 SF Tankstelle
    {42,18,172.3732,-201.2953,1.5703,-31.0033,-91.5368,1003.5600,42,"24/7 Laden"}, // 24/7 Farm
    {43,18,672.5079,-646.8347,16.3359,-31.0033,-91.5368,1003.5600,43,"24/7 Laden"}, // 24/7 Dillimore
    {44,3,671.4097,-519.8035,16.3359,834.0005,7.3860,1004.1797,44,"Casino in Dillimore"},//Casino in Dillimore
    {0,5,627.9210,-571.8536,17.4747,322.2110,302.6740,999.1484,-1,"Dillimore Arrest"}, // Dillimore Arrest
    {47,17,1038.3060,-1340.2660,13.7394,377.1027,-192.6963,1000.6401,47,"Donutladen"},//Donut Laden
    {2,0,-2765.0505,375.4608,6.3433,2305.3269,-16.0568,26.7422,48,"Arbeitsamt SF"},//Arbeitsamt SF
    {2,15,-1883.4063,865.4304,35.1719,207.6253,-110.9604,1005.1328,3,"Kleidergesch"}, // Kleidergeschäft
    {1,1,2131.9521,-1150.6293,24.1379,1403.2238,5.5065,1000.9067,63,"Gangautohaus"}, //Gangautohaus
    {1,1,499.7611,-1360.2394,16.3331,207.054992,-138.804992,1003.507812,3,"Prolaps"}, //Prolaps
    {1,1,2244.5352,-1664.9318,15.4766,207.737991,-109.019996,1005.132812,15,"Binco"}, //Binco
    //{1,1,2131.9521,-1150.6293,24.1379,161.391006,-93.159156,1001.804687,18,"Zip"}, //Zip
    {1,1,461.3346,-1500.7125,31.0606,226.293991,-7.431529,1002.210937,5,"Victim"}, //Victim
    {1,1,2112.6941,-1211.5792,23.9630,203.777999,-48.492397,1001.804687,1,"Suburban"}, //Suburban
    {1,1,453.5518,-1478.0765,30.8104,204.332992,-166.694992,1000.523437,14,"Didier Sachs"}, //Didier Sachs
    {0,18,1411.6747,-1699.6981,13.5395, 1700.5880,-1667.8499,20.2188,72,"Hotel Los Santos"} // Hotel
    };


  • heyhooo:
    Ich benutze paar andere dort:



    for(new h = 0; h < sizeof(AutomatikPortInfo); h++)
    {
    format(string2, sizeof(string2), "{FFFFFF}Willkommen am\n"#SERVERFARBE"[{FFFFFF}%s"#SERVERFARBE"]",AutomatikPortInfo[h][APName]);
    Create3DTextLabel(string2,COLOR_WHITE,AutomatikPortInfo[h][APEingangX],AutomatikPortInfo[h][APEingangY],AutomatikPortInfo[h][APEingangZ]+1.0,15.0,0,0);
    AutomatikPortInfo[h][APAusgangPickup] = CreatePickup(1239, 23, AutomatikPortInfo[h][APAusgangX], AutomatikPortInfo[h][APAusgangY], AutomatikPortInfo[h][APAusgangZ],-1);
    AutomatikPortInfo[h][APEingangPickup] = CreatePickup(1239, 23, AutomatikPortInfo[h][APEingangX], AutomatikPortInfo[h][APEingangY], AutomatikPortInfo[h][APEingangZ]+0.2,-1);
    }