Error bei Autohaussys

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
  • hi Leute ich hab ein Problem mit meinem Autohaus system und zwar hab ich 1 error und 1 Warn



    new Buycars[50][AKinfo] = {
    {411, "Infernus","Sport Autohaus",1000000,-1955.0531,304.5389,40.7742,122.3502},
    {415, "Cheetah","Sport Autohaus",150000,-1954.5131,294.5710,40.8191,122.7950},
    {429, "Banshee","Sport Autohaus",140000,-1950.0768,269.2401,40.7299,72.2320},
    {451, "Tourismo","Sport Autohaus",150000,-1951.6071,260.1078,40.7554,70.5601},
    {477, "ZR-350","Sport Autohaus",100000,-1953.5073,260.5029,35.2253,58.6188},
    {506, "Super GT","Sport Autohaus",130000,-1957.4139,300.3961,35.1730,125.5672},
    {541, "Bullet","Sport Autohaus",150000,-1953.3641,270.7859,35.0938,56.5188},
    {480, "Comet","Sport Autohaus",140000,-1956.1738,294.2752,35.2405,124.7477},
    {522, "NRG-500","Zweirad Autohaus",1000000,-1654.9429,1207.2512,20.7170,306.5155},
    {521, "FCR-900","Zweirad Autohaus",80000,-1660.2422,1217.1395,20.7280,309.0196},
    {581, "BF-400","Zweirad Autohaus",40000,-1660.2567,1211.1436,20.7470,288.8666},
    {461, "PCJ-600","Zweirad Autohaus",35000,-1658.1112,1212.7875,13.2473,285.2480},
    {462, "Faggio","Zweirad Autohaus",1500,-1661.4714,1217.1295,13.2719,324.3498},
    {463, "Freeway","Zweirad Autohaus",45000,-1651.3024,1208.7772,13.2122,267.8348},
    {468, "Sanchez","Zweirad Autohaus",25000,-1670.7189,1205.2567,13.3410,280.3656},
    {481, "BMX","Zweirad Autohaus",800,-1663.3920,1215.1544,6.7645,257.6043},
    {509, "Fahrrad","Zweirad Autohaus",500,-1657.7156,1212.4661,6.7559,290.8512},
    {510,"Mountainbike","Zweirad Autohaus",650,-1664.7076,1210.1763,6.8694,290.3362},
    {422,"Bobcat","Freizeit Autohaus",9000,1763.8551,-1690.1669,13.4027,178.4855},
    {426,"Premier","Freizeit Autohaus",9000,1767.8622,-1690.3395,13.1685,181.1030},
    {439,"Stallion","Freizeit Autohaus",8500,1771.7323,-1690.3013,13.3223,180.2207},
    {445,"Admiral","Freizeit Autohaus",8000,1775.5173,-1690.5382,13.3085,179.3625},
    {458,"Fortune","Freizeit Autohaus",7500,1779.5638,-1690.4932,13.3166,181.9642},
    {466,"Glendale","Freizeit Autohaus",7500,1783.3644,-1690.6383,13.1855,181.1717},
    {467,"Oceanic","Freizeit Autohaus",7000,1786.9015,-1690.8125,13.1904,180.6998},
    {475,"Clover","Freizeit Autohaus",4000,1790.8936,-1690.8954,13.2745,178.9125},
    {479,"Regina","Freizeit Autohaus",5000,1794.9092,-1691.1754,13.2832,180.5360},
    {483,"Camper","Freizeit Autohaus",7000,1798.9198,-1691.3407,13.5012,181.1373},
    {489,"Rancher","Freizeit Autohaus",8000,1803.2632,-1692.0082,13.6756,179.8214},
    {496,"Blista Compact","Freizeit Autohaus",4000,1763.8073,-1702.6541,13.1655,1.5629},
    {515,"Roadtrain","Freizeit Autohaus",125000,1767.5022,-1700.5106,14.4887,359.9904},
    {533,"Feltzer","Freizeit Autohaus",15000,1772.0725,-1702.1674,13.2137,358.8606},
    {535,"SlamVan","Freizeit Autohaus",12000,1775.2120,-1703.0474,13.2769,2.9319},
    {536,"Blade","Freizeit Autohaus",12000,1778.9072,-1701.7804,13.2419,359.6935},
    {558,"Uranus","Freizeit Authaus",40000,1782.0527,-1701.8767,13.1352,0.7082},
    {559,"Jester","Freizeit Autohaus",40000,1785.3872,-1701.6630,13.1599,1.8293},
    {560,"Sultan","Freizeit Autohaus",40000,1788.6716,-1701.4359,13.2176,1.4385},
    {562,"Elegy","Freizeit Autohaus",35000,1792.0527,-1701.4491,13.1849,2.5118},
    {565,"Flash","Freizeit Autohaus",22000,1795.4730,-1701.6250,13.1568,1.0073},
    {589,"Club","Freizeit Autohaus",15000,1798.4808,-1701.9138,13.1894,0.2580},
    {519,"Shamal","Flugzeug und Heli Autohaus",350000,2074.2085,-2638.0344,14.4657,17.3028},
    {487,"Maverick","Flugzeug und Heli Autohaus",500000,2048.3877,-2641.0112,13.7237,11.7053},
    {417,"Leviathan","Flugzeug und Heli Autohaus",700000,2027.5150,-2641.1536,13.6367,0.2648},
    {593,"Dodo","Flugzeug und Heli Autohaus",200000,2099.8081,-2629.2363,14.0049,17.4203},
    {493,"Jetmax","Flugzeug und Heli Autohaus",70000,-2230.2148,2390.9246,0.0743,44.9745},
    {446,"Squallo","Flugzeug und Heli Autohaus",75000,-2223.9268,2399.5220,-0.6481,46.0076},
    {454,"Tropic","Flugzeug und Heli Autohaus",60000,-2263.2017,2422.8240,0.0341,225.2825},
    {473,"Dinghy","Flugzeug und Heli Autohaus",10000,-2211.5176,2414.0410,-0.0283,39.6659},
    {484,"Marquis","Flugzeug und Heli Autohaus",150000,-2253.0745,2429.4775,0.0898,224.7455},
    {452,"Speeder","Flugzeug und Heli Autohaus",150000,-2202.3467,2417.1382,-0.5324,44.5556}, // Zeile 523
    };



    Errors:
    C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\GRSA_Reallife_Script.pwn(523) : error 018: initialization data exceeds declared size
    C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\GRSA_Reallife_Script.pwn(630) : warning 213: tag mismatch
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.




    hier ist der Tag missmatch
    for(new i = 0; i < sizeof Autohaus; i++)
    {
    new datei[50];
    format(datei,sizeof(datei),"Autohauser/%s.ini",Autohaus[i][Name]);
    if(!dini_Exists(datei))
    {
    dini_Create(datei);
    dini_Set(datei,"Besitzer","Staat");
    dini_IntSet(datei,"Kasse",Autohaus[i][Kasse]);
    }
    Autohaus[i][Kasse] = dini_Int(datei,"Kasse");
    format(Autohaus[i][Besitzer],MAX_PLAYER_NAME,dini_Get(datei,"Besitzer"));
    CreatePickup(1239,1,Autohaus[i][posx],Autohaus[i][posy],Autohaus[i][posz],-1); //hier ist der missmatch
    }

  • Der erste Error sagt dir schon, was los ist - dein Array ist zu klein. Einfach den Array Bucars auf 100 oder so erweitern.. Welche Zeile ist denn die Zeile 630?
    for(new i = 0; i < sizeof(Autohaus); i++)
    Evtl mal das letzte Komma im Array entfernen, arbeite noch nicht so lange mit Arrays

    Greetz

  • C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\GRSA_Reallife_Script.pwn(524) : error 029: invalid expression, assumed zero
    C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\GRSA_Reallife_Script.pwn(524) : error 008: must be a constant expression; assumed zero
    C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\GRSA_Reallife_Script.pwn(630) : warning 213: tag mismatch
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.


    new kaufauto[51];
    new Autohaus[5][AHinfo] = {
    {"Sport Autohaus",-1967.3391,291.5713,35.1777,-1.1754,-301.1899,5.1316,89.0030,0,"San Fierro"},
    {"Autohaus Freizeit",1809.2705,-1722.6608,13.5363,-1.3433,-318.7282,5.1364,90.1092,0,"Los Santos"},
    {"Zweirad Autohaus",-1654.3406,1209.3326,7.2500,-30.8758,-293.3791,5.0860,270.9798,0,"San Fierro"},
    {"Bootshaus",-2267.4692,2428.9053,4.9813,-2324.4094,2299.5740,-0.1233,181.7380,0,"San Fierro"},
    {"Flugzeug und Heli Autohaus",2020.4681,-2630.5430,13.5469,1989.3278,-2382.5083,14.4679,90.0296}
    };
    new Buycars[51][AKinfo] = {
    {411, "Infernus","Sport Autohaus",1000000,-1955.0531,304.5389,40.7742,122.3502},
    {415, "Cheetah","Sport Autohaus",150000,-1954.5131,294.5710,40.8191,122.7950},
    {429, "Banshee","Sport Autohaus",140000,-1950.0768,269.2401,40.7299,72.2320},
    {451, "Tourismo","Sport Autohaus",150000,-1951.6071,260.1078,40.7554,70.5601},
    {477, "ZR-350","Sport Autohaus",100000,-1953.5073,260.5029,35.2253,58.6188},
    {506, "Super GT","Sport Autohaus",130000,-1957.4139,300.3961,35.1730,125.5672},
    {541, "Bullet","Sport Autohaus",150000,-1953.3641,270.7859,35.0938,56.5188},
    {480, "Comet","Sport Autohaus",140000,-1956.1738,294.2752,35.2405,124.7477},
    {522, "NRG-500","Zweirad Autohaus",1000000,-1654.9429,1207.2512,20.7170,306.5155},
    {521, "FCR-900","Zweirad Autohaus",80000,-1660.2422,1217.1395,20.7280,309.0196},
    {581, "BF-400","Zweirad Autohaus",40000,-1660.2567,1211.1436,20.7470,288.8666},
    {461, "PCJ-600","Zweirad Autohaus",35000,-1658.1112,1212.7875,13.2473,285.2480},
    {462, "Faggio","Zweirad Autohaus",1500,-1661.4714,1217.1295,13.2719,324.3498},
    {463, "Freeway","Zweirad Autohaus",45000,-1651.3024,1208.7772,13.2122,267.8348},
    {468, "Sanchez","Zweirad Autohaus",25000,-1670.7189,1205.2567,13.3410,280.3656},
    {481, "BMX","Zweirad Autohaus",800,-1663.3920,1215.1544,6.7645,257.6043},
    {509, "Fahrrad","Zweirad Autohaus",500,-1657.7156,1212.4661,6.7559,290.8512},
    {510,"Mountainbike","Zweirad Autohaus",650,-1664.7076,1210.1763,6.8694,290.3362},
    {422,"Bobcat","Freizeit Autohaus",9000,1763.8551,-1690.1669,13.4027,178.4855},
    {426,"Premier","Freizeit Autohaus",9000,1767.8622,-1690.3395,13.1685,181.1030},
    {439,"Stallion","Freizeit Autohaus",8500,1771.7323,-1690.3013,13.3223,180.2207},
    {445,"Admiral","Freizeit Autohaus",8000,1775.5173,-1690.5382,13.3085,179.3625},
    {458,"Fortune","Freizeit Autohaus",7500,1779.5638,-1690.4932,13.3166,181.9642},
    {466,"Glendale","Freizeit Autohaus",7500,1783.3644,-1690.6383,13.1855,181.1717},
    {467,"Oceanic","Freizeit Autohaus",7000,1786.9015,-1690.8125,13.1904,180.6998},
    {475,"Clover","Freizeit Autohaus",4000,1790.8936,-1690.8954,13.2745,178.9125},
    {479,"Regina","Freizeit Autohaus",5000,1794.9092,-1691.1754,13.2832,180.5360},
    {483,"Camper","Freizeit Autohaus",7000,1798.9198,-1691.3407,13.5012,181.1373},
    {489,"Rancher","Freizeit Autohaus",8000,1803.2632,-1692.0082,13.6756,179.8214},
    {496,"Blista Compact","Freizeit Autohaus",4000,1763.8073,-1702.6541,13.1655,1.5629},
    {515,"Roadtrain","Freizeit Autohaus",125000,1767.5022,-1700.5106,14.4887,359.9904},
    {533,"Feltzer","Freizeit Autohaus",15000,1772.0725,-1702.1674,13.2137,358.8606},
    {535,"SlamVan","Freizeit Autohaus",12000,1775.2120,-1703.0474,13.2769,2.9319},
    {536,"Blade","Freizeit Autohaus",12000,1778.9072,-1701.7804,13.2419,359.6935},
    {558,"Uranus","Freizeit Authaus",40000,1782.0527,-1701.8767,13.1352,0.7082},
    {559,"Jester","Freizeit Autohaus",40000,1785.3872,-1701.6630,13.1599,1.8293},
    {560,"Sultan","Freizeit Autohaus",40000,1788.6716,-1701.4359,13.2176,1.4385},
    {562,"Elegy","Freizeit Autohaus",35000,1792.0527,-1701.4491,13.1849,2.5118},
    {565,"Flash","Freizeit Autohaus",22000,1795.4730,-1701.6250,13.1568,1.0073},
    {589,"Club","Freizeit Autohaus",15000,1798.4808,-1701.9138,13.1894,0.2580},
    {519,"Shamal","Flugzeug und Heli Autohaus",350000,2074.2085,-2638.0344,14.4657,17.3028},
    {487,"Maverick","Flugzeug und Heli Autohaus",500000,2048.3877,-2641.0112,13.7237,11.7053},
    {417,"Leviathan","Flugzeug und Heli Autohaus",700000,2027.5150,-2641.1536,13.6367,0.2648},
    {593,"Dodo","Flugzeug und Heli Autohaus",200000,2099.8081,-2629.2363,14.0049,17.4203},
    {493,"Jetmax","Flugzeug und Heli Autohaus",70000,-2230.2148,2390.9246,0.0743,44.9745},
    {446,"Squallo","Flugzeug und Heli Autohaus",75000,-2223.9268,2399.5220,-0.6481,46.0076},
    {454,"Tropic","Flugzeug und Heli Autohaus",60000,-2263.2017,2422.8240,0.0341,225.2825},
    {473,"Dinghy","Flugzeug und Heli Autohaus",10000,-2211.5176,2414.0410,-0.0283,39.6659},
    {484,"Marquis","Flugzeug und Heli Autohaus",150000,-2253.0745,2429.4775,0.0898,224.7455},
    {452,"Speeder","Flugzeug und Heli Autohaus",150000,-2202.3467,2417.1382,-0.5324,44.5556}
    }; //Zeile 524


  • new Buycars[51][AKinfo] = {
    {411, "Infernus","Sport Autohaus",1000000,-1955.0531,304.5389,40.7742,122.3502},
    {415, "Cheetah","Sport Autohaus",150000,-1954.5131,294.5710,40.8191,122.7950},
    {429, "Banshee","Sport Autohaus",140000,-1950.0768,269.2401,40.7299,72.2320},
    {451, "Tourismo","Sport Autohaus",150000,-1951.6071,260.1078,40.7554,70.5601},
    {477, "ZR-350","Sport Autohaus",100000,-1953.5073,260.5029,35.2253,58.6188},
    {506, "Super GT","Sport Autohaus",130000,-1957.4139,300.3961,35.1730,125.5672},
    {541, "Bullet","Sport Autohaus",150000,-1953.3641,270.7859,35.0938,56.5188},
    {480, "Comet","Sport Autohaus",140000,-1956.1738,294.2752,35.2405,124.7477},
    {522, "NRG-500","Zweirad Autohaus",1000000,-1654.9429,1207.2512,20.7170,306.5155},
    {521, "FCR-900","Zweirad Autohaus",80000,-1660.2422,1217.1395,20.7280,309.0196},
    {581, "BF-400","Zweirad Autohaus",40000,-1660.2567,1211.1436,20.7470,288.8666},
    {461, "PCJ-600","Zweirad Autohaus",35000,-1658.1112,1212.7875,13.2473,285.2480},
    {462, "Faggio","Zweirad Autohaus",1500,-1661.4714,1217.1295,13.2719,324.3498},
    {463, "Freeway","Zweirad Autohaus",45000,-1651.3024,1208.7772,13.2122,267.8348},
    {468, "Sanchez","Zweirad Autohaus",25000,-1670.7189,1205.2567,13.3410,280.3656},
    {481, "BMX","Zweirad Autohaus",800,-1663.3920,1215.1544,6.7645,257.6043},
    {509, "Fahrrad","Zweirad Autohaus",500,-1657.7156,1212.4661,6.7559,290.8512},
    {510,"Mountainbike","Zweirad Autohaus",650,-1664.7076,1210.1763,6.8694,290.3362},
    {422,"Bobcat","Freizeit Autohaus",9000,1763.8551,-1690.1669,13.4027,178.4855},
    {426,"Premier","Freizeit Autohaus",9000,1767.8622,-1690.3395,13.1685,181.1030},
    {439,"Stallion","Freizeit Autohaus",8500,1771.7323,-1690.3013,13.3223,180.2207},
    {445,"Admiral","Freizeit Autohaus",8000,1775.5173,-1690.5382,13.3085,179.3625},
    {458,"Fortune","Freizeit Autohaus",7500,1779.5638,-1690.4932,13.3166,181.9642},
    {466,"Glendale","Freizeit Autohaus",7500,1783.3644,-1690.6383,13.1855,181.1717},
    {467,"Oceanic","Freizeit Autohaus",7000,1786.9015,-1690.8125,13.1904,180.6998},
    {475,"Clover","Freizeit Autohaus",4000,1790.8936,-1690.8954,13.2745,178.9125},
    {479,"Regina","Freizeit Autohaus",5000,1794.9092,-1691.1754,13.2832,180.5360},
    {483,"Camper","Freizeit Autohaus",7000,1798.9198,-1691.3407,13.5012,181.1373},
    {489,"Rancher","Freizeit Autohaus",8000,1803.2632,-1692.0082,13.6756,179.8214},
    {496,"Blista Compact","Freizeit Autohaus",4000,1763.8073,-1702.6541,13.1655,1.5629},
    {515,"Roadtrain","Freizeit Autohaus",125000,1767.5022,-1700.5106,14.4887,359.9904},
    {533,"Feltzer","Freizeit Autohaus",15000,1772.0725,-1702.1674,13.2137,358.8606},
    {535,"SlamVan","Freizeit Autohaus",12000,1775.2120,-1703.0474,13.2769,2.9319},
    {536,"Blade","Freizeit Autohaus",12000,1778.9072,-1701.7804,13.2419,359.6935},
    {558,"Uranus","Freizeit Authaus",40000,1782.0527,-1701.8767,13.1352,0.7082},
    {559,"Jester","Freizeit Autohaus",40000,1785.3872,-1701.6630,13.1599,1.8293},
    {560,"Sultan","Freizeit Autohaus",40000,1788.6716,-1701.4359,13.2176,1.4385},
    {562,"Elegy","Freizeit Autohaus",35000,1792.0527,-1701.4491,13.1849,2.5118},
    {565,"Flash","Freizeit Autohaus",22000,1795.4730,-1701.6250,13.1568,1.0073},
    {589,"Club","Freizeit Autohaus",15000,1798.4808,-1701.9138,13.1894,0.2580},
    {519,"Shamal","Flugzeug und Heli Autohaus",350000,2074.2085,-2638.0344,14.4657,17.3028},
    {487,"Maverick","Flugzeug und Heli Autohaus",500000,2048.3877,-2641.0112,13.7237,11.7053},
    {417,"Leviathan","Flugzeug und Heli Autohaus",700000,2027.5150,-2641.1536,13.6367,0.2648},
    {593,"Dodo","Flugzeug und Heli Autohaus",200000,2099.8081,-2629.2363,14.0049,17.4203},
    {493,"Jetmax","Flugzeug und Heli Autohaus",70000,-2230.2148,2390.9246,0.0743,44.9745},
    {446,"Squallo","Flugzeug und Heli Autohaus",75000,-2223.9268,2399.5220,-0.6481,46.0076},
    {454,"Tropic","Flugzeug und Heli Autohaus",60000,-2263.2017,2422.8240,0.0341,225.2825},
    {473,"Dinghy","Flugzeug und Heli Autohaus",10000,-2211.5176,2414.0410,-0.0283,39.6659},
    {484,"Marquis","Flugzeug und Heli Autohaus",150000,-2253.0745,2429.4775,0.0898,224.7455},
    {452,"Speeder","Flugzeug und Heli Autohaus",150000,-2202.3467,2417.1382,-0.5324,44.5556},
    };//zeile 524



    Errors:
    C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\GRSA_Reallife_Script.pwn(524) : error 029: invalid expression, assumed zero
    C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\GRSA_Reallife_Script.pwn(524) : error 008: must be a constant expression; assumed zero





    for(new i = 0; i < sizeof Autohaus; i++)
    {
    new datei[50];
    format(datei,sizeof(datei),"Autohauser/%s.ini",Autohaus[i][Name]);
    if(!dini_Exists(datei))
    {
    dini_Create(datei);
    dini_Set(datei,"Besitzer","Staat");
    dini_IntSet(datei,"Kasse",Autohaus[i][Kasse]);
    }
    Autohaus[i][Kasse] = dini_Int(datei,"Kasse");
    format(Autohaus[i][Besitzer],MAX_PLAYER_NAME,dini_Get(datei,"Besitzer"));
    CreatePickup(1239,1,Autohaus[i][posx],Autohaus[i][posy],Autohaus[i][posz],-1);//630
    }



    Errros:
    C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\GRSA_Reallife_Script.pwn(630) : warning 213: tag mismatch

    2 Mal editiert, zuletzt von Ralf () aus folgendem Grund: Komma vergessen bei Code

  • Hast oben die Fahrzeug anzahl geändert?
    Also gezählt und +1 dazugerechnet?


    Gruß


    Was für ein Quatsch. Warum soll(te) er +1 rechnen ?


    Lass es doch einfach offen und automatisch ermitteln wie groß es sein muss:
    new Buycars[][AKinfo] = {
    Damit sparst du dir sinnloses zählen.Die Größe bekommst auch mit sizeof() zurück.


    In der letzten Zeile des Arrays muss auch das , am Ende weg.

  • Versuchs mal so,




    for(new i = 0; i < sizeof Autohaus; i++)
    {
    new datei[50];
    format(datei,sizeof(datei),"Autohauser/%s.ini",Autohaus[i][Name]);
    if(!dini_Exists(datei))
    {
    dini_Create(datei);
    dini_Set(datei,"Besitzer","Staat");
    dini_IntSet(datei,"Kasse",Autohaus[i][Kasse]);
    }
    Autohaus[i][Kasse] = dini_Int(datei,"Kasse");
    format(Autohaus[i][Besitzer],MAX_PLAYER_NAME,dini_Get(datei,"Besitzer"));
    CreatePickup(1239,1,Autohaus[i][posx],Autohaus[i][posy],Autohaus[i][posz],1);//630
    }
    new Buycars[51][AKinfo] = {
    {411, "Infernus","Sport Autohaus",1000000,-1955.0531,304.5389,40.7742,122.3502},
    {415, "Cheetah","Sport Autohaus",150000,-1954.5131,294.5710,40.8191,122.7950},
    {429, "Banshee","Sport Autohaus",140000,-1950.0768,269.2401,40.7299,72.2320},
    {451, "Tourismo","Sport Autohaus",150000,-1951.6071,260.1078,40.7554,70.5601},
    {477, "ZR-350","Sport Autohaus",100000,-1953.5073,260.5029,35.2253,58.6188},
    {506, "Super GT","Sport Autohaus",130000,-1957.4139,300.3961,35.1730,125.5672},
    {541, "Bullet","Sport Autohaus",150000,-1953.3641,270.7859,35.0938,56.5188},
    {480, "Comet","Sport Autohaus",140000,-1956.1738,294.2752,35.2405,124.7477},
    {522, "NRG-500","Zweirad Autohaus",1000000,-1654.9429,1207.2512,20.7170,306.5155},
    {521, "FCR-900","Zweirad Autohaus",80000,-1660.2422,1217.1395,20.7280,309.0196},
    {581, "BF-400","Zweirad Autohaus",40000,-1660.2567,1211.1436,20.7470,288.8666},
    {461, "PCJ-600","Zweirad Autohaus",35000,-1658.1112,1212.7875,13.2473,285.2480},
    {462, "Faggio","Zweirad Autohaus",1500,-1661.4714,1217.1295,13.2719,324.3498},
    {463, "Freeway","Zweirad Autohaus",45000,-1651.3024,1208.7772,13.2122,267.8348},
    {468, "Sanchez","Zweirad Autohaus",25000,-1670.7189,1205.2567,13.3410,280.3656},
    {481, "BMX","Zweirad Autohaus",800,-1663.3920,1215.1544,6.7645,257.6043},
    {509, "Fahrrad","Zweirad Autohaus",500,-1657.7156,1212.4661,6.7559,290.8512},
    {510,"Mountainbike","Zweirad Autohaus",650,-1664.7076,1210.1763,6.8694,290.3362},
    {422,"Bobcat","Freizeit Autohaus",9000,1763.8551,-1690.1669,13.4027,178.4855},
    {426,"Premier","Freizeit Autohaus",9000,1767.8622,-1690.3395,13.1685,181.1030},
    {439,"Stallion","Freizeit Autohaus",8500,1771.7323,-1690.3013,13.3223,180.2207},
    {445,"Admiral","Freizeit Autohaus",8000,1775.5173,-1690.5382,13.3085,179.3625},
    {458,"Fortune","Freizeit Autohaus",7500,1779.5638,-1690.4932,13.3166,181.9642},
    {466,"Glendale","Freizeit Autohaus",7500,1783.3644,-1690.6383,13.1855,181.1717},
    {467,"Oceanic","Freizeit Autohaus",7000,1786.9015,-1690.8125,13.1904,180.6998},
    {475,"Clover","Freizeit Autohaus",4000,1790.8936,-1690.8954,13.2745,178.9125},
    {479,"Regina","Freizeit Autohaus",5000,1794.9092,-1691.1754,13.2832,180.5360},
    {483,"Camper","Freizeit Autohaus",7000,1798.9198,-1691.3407,13.5012,181.1373},
    {489,"Rancher","Freizeit Autohaus",8000,1803.2632,-1692.0082,13.6756,179.8214},
    {496,"Blista Compact","Freizeit Autohaus",4000,1763.8073,-1702.6541,13.1655,1.5629},
    {515,"Roadtrain","Freizeit Autohaus",125000,1767.5022,-1700.5106,14.4887,359.9904},
    {533,"Feltzer","Freizeit Autohaus",15000,1772.0725,-1702.1674,13.2137,358.8606},
    {535,"SlamVan","Freizeit Autohaus",12000,1775.2120,-1703.0474,13.2769,2.9319},
    {536,"Blade","Freizeit Autohaus",12000,1778.9072,-1701.7804,13.2419,359.6935},
    {558,"Uranus","Freizeit Authaus",40000,1782.0527,-1701.8767,13.1352,0.7082},
    {559,"Jester","Freizeit Autohaus",40000,1785.3872,-1701.6630,13.1599,1.8293},
    {560,"Sultan","Freizeit Autohaus",40000,1788.6716,-1701.4359,13.2176,1.4385},
    {562,"Elegy","Freizeit Autohaus",35000,1792.0527,-1701.4491,13.1849,2.5118},
    {565,"Flash","Freizeit Autohaus",22000,1795.4730,-1701.6250,13.1568,1.0073},
    {589,"Club","Freizeit Autohaus",15000,1798.4808,-1701.9138,13.1894,0.2580},
    {519,"Shamal","Flugzeug und Heli Autohaus",350000,2074.2085,-2638.0344,14.4657,17.3028},
    {487,"Maverick","Flugzeug und Heli Autohaus",500000,2048.3877,-2641.0112,13.7237,11.7053},
    {417,"Leviathan","Flugzeug und Heli Autohaus",700000,2027.5150,-2641.1536,13.6367,0.2648},
    {593,"Dodo","Flugzeug und Heli Autohaus",200000,2099.8081,-2629.2363,14.0049,17.4203},
    {493,"Jetmax","Flugzeug und Heli Autohaus",70000,-2230.2148,2390.9246,0.0743,44.9745},
    {446,"Squallo","Flugzeug und Heli Autohaus",75000,-2223.9268,2399.5220,-0.6481,46.0076},
    {454,"Tropic","Flugzeug und Heli Autohaus",60000,-2263.2017,2422.8240,0.0341,225.2825},
    {473,"Dinghy","Flugzeug und Heli Autohaus",10000,-2211.5176,2414.0410,-0.0283,39.6659},
    {484,"Marquis","Flugzeug und Heli Autohaus",150000,-2253.0745,2429.4775,0.0898,224.7455},
    {452,"Speeder","Flugzeug und Heli Autohaus",150000,-2202.3467,2417.1382,-0.5324,44.5556}
    };//zeile 524

  • Hab das komma weggemacht und jetzt kommt der error

    new Buycars[51][AKinfo] = {
    {411, "Infernus","Sport Autohaus",1000000,-1955.0531,304.5389,40.7742,122.3502},
    {415, "Cheetah","Sport Autohaus",150000,-1954.5131,294.5710,40.8191,122.7950},
    {429, "Banshee","Sport Autohaus",140000,-1950.0768,269.2401,40.7299,72.2320},
    {451, "Tourismo","Sport Autohaus",150000,-1951.6071,260.1078,40.7554,70.5601},
    {477, "ZR-350","Sport Autohaus",100000,-1953.5073,260.5029,35.2253,58.6188},
    {506, "Super GT","Sport Autohaus",130000,-1957.4139,300.3961,35.1730,125.5672},
    {541, "Bullet","Sport Autohaus",150000,-1953.3641,270.7859,35.0938,56.5188},
    {480, "Comet","Sport Autohaus",140000,-1956.1738,294.2752,35.2405,124.7477},
    {522, "NRG-500","Zweirad Autohaus",1000000,-1654.9429,1207.2512,20.7170,306.5155},
    {521, "FCR-900","Zweirad Autohaus",80000,-1660.2422,1217.1395,20.7280,309.0196},
    {581, "BF-400","Zweirad Autohaus",40000,-1660.2567,1211.1436,20.7470,288.8666},
    {461, "PCJ-600","Zweirad Autohaus",35000,-1658.1112,1212.7875,13.2473,285.2480},
    {462, "Faggio","Zweirad Autohaus",1500,-1661.4714,1217.1295,13.2719,324.3498},
    {463, "Freeway","Zweirad Autohaus",45000,-1651.3024,1208.7772,13.2122,267.8348},
    {468, "Sanchez","Zweirad Autohaus",25000,-1670.7189,1205.2567,13.3410,280.3656},
    {481, "BMX","Zweirad Autohaus",800,-1663.3920,1215.1544,6.7645,257.6043},
    {509, "Fahrrad","Zweirad Autohaus",500,-1657.7156,1212.4661,6.7559,290.8512},
    {510,"Mountainbike","Zweirad Autohaus",650,-1664.7076,1210.1763,6.8694,290.3362},
    {422,"Bobcat","Freizeit Autohaus",9000,1763.8551,-1690.1669,13.4027,178.4855},
    {426,"Premier","Freizeit Autohaus",9000,1767.8622,-1690.3395,13.1685,181.1030},
    {439,"Stallion","Freizeit Autohaus",8500,1771.7323,-1690.3013,13.3223,180.2207},
    {445,"Admiral","Freizeit Autohaus",8000,1775.5173,-1690.5382,13.3085,179.3625},
    {458,"Fortune","Freizeit Autohaus",7500,1779.5638,-1690.4932,13.3166,181.9642},
    {466,"Glendale","Freizeit Autohaus",7500,1783.3644,-1690.6383,13.1855,181.1717},
    {467,"Oceanic","Freizeit Autohaus",7000,1786.9015,-1690.8125,13.1904,180.6998},
    {475,"Clover","Freizeit Autohaus",4000,1790.8936,-1690.8954,13.2745,178.9125},
    {479,"Regina","Freizeit Autohaus",5000,1794.9092,-1691.1754,13.2832,180.5360},
    {483,"Camper","Freizeit Autohaus",7000,1798.9198,-1691.3407,13.5012,181.1373},
    {489,"Rancher","Freizeit Autohaus",8000,1803.2632,-1692.0082,13.6756,179.8214},
    {496,"Blista Compact","Freizeit Autohaus",4000,1763.8073,-1702.6541,13.1655,1.5629},
    {515,"Roadtrain","Freizeit Autohaus",125000,1767.5022,-1700.5106,14.4887,359.9904},
    {533,"Feltzer","Freizeit Autohaus",15000,1772.0725,-1702.1674,13.2137,358.8606},
    {535,"SlamVan","Freizeit Autohaus",12000,1775.2120,-1703.0474,13.2769,2.9319},
    {536,"Blade","Freizeit Autohaus",12000,1778.9072,-1701.7804,13.2419,359.6935},
    {558,"Uranus","Freizeit Authaus",40000,1782.0527,-1701.8767,13.1352,0.7082},
    {559,"Jester","Freizeit Autohaus",40000,1785.3872,-1701.6630,13.1599,1.8293},
    {560,"Sultan","Freizeit Autohaus",40000,1788.6716,-1701.4359,13.2176,1.4385},
    {562,"Elegy","Freizeit Autohaus",35000,1792.0527,-1701.4491,13.1849,2.5118},
    {565,"Flash","Freizeit Autohaus",22000,1795.4730,-1701.6250,13.1568,1.0073},
    {589,"Club","Freizeit Autohaus",15000,1798.4808,-1701.9138,13.1894,0.2580},
    {519,"Shamal","Flugzeug und Heli Autohaus",350000,2074.2085,-2638.0344,14.4657,17.3028},
    {487,"Maverick","Flugzeug und Heli Autohaus",500000,2048.3877,-2641.0112,13.7237,11.7053},
    {417,"Leviathan","Flugzeug und Heli Autohaus",700000,2027.5150,-2641.1536,13.6367,0.2648},
    {593,"Dodo","Flugzeug und Heli Autohaus",200000,2099.8081,-2629.2363,14.0049,17.4203},
    {493,"Jetmax","Flugzeug und Heli Autohaus",70000,-2230.2148,2390.9246,0.0743,44.9745},
    {446,"Squallo","Flugzeug und Heli Autohaus",75000,-2223.9268,2399.5220,-0.6481,46.0076},
    {454,"Tropic","Flugzeug und Heli Autohaus",60000,-2263.2017,2422.8240,0.0341,225.2825},
    {473,"Dinghy","Flugzeug und Heli Autohaus",10000,-2211.5176,2414.0410,-0.0283,39.6659},
    {484,"Marquis","Flugzeug und Heli Autohaus",150000,-2253.0745,2429.4775,0.0898,224.7455},
    {452,"Speeder","Flugzeug und Heli Autohaus",150000,-2202.3467,2417.1382,-0.5324,44.5556}
    };


    524) : error 052: multi-dimensional arrays must be fully initialized

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • also einfach Klammer leer lassen ?


    //Goldkiller: Ja.




    Ok hab jetzt nurnoch den Warning :

    CreatePickup(1239,1,Autohaus[i][posx],Autohaus[i][posy],Autohaus[i][posz],1); //Tag mismatch

    2 Mal editiert, zuletzt von Ralf ()

  • Ich hoffe mal dass du damit was anfangen kannst ^^


    enum AHinfo
    {
    Name[50],
    Float:posx,
    Float:posy,
    Float:posZ,
    Float:spawnx,
    Float:spawny,
    Float:spawnz,
    Float:spawna,
    Kasse,
    Besitzer[MAX_PLAYER_NAME]
    }
    enum AKinfo
    {
    modelid,
    Name[35],
    Autohausname[50],
    Preis,
    Float:posx,
    Float:posy,
    Float:posz,
    Float:posa
    }
    new kaufauto[51];
    new Autohaus[5][AHinfo] = {
    {"Sport Autohaus",-1967.3391,291.5713,35.1777,-1.1754,-301.1899,5.1316,89.0030,0,"San Fierro"},
    {"Autohaus Freizeit",1809.2705,-1722.6608,13.5363,-1.3433,-318.7282,5.1364,90.1092,0,"Los Santos"},
    {"Zweirad Autohaus",-1654.3406,1209.3326,7.2500,-30.8758,-293.3791,5.0860,270.9798,0,"San Fierro"},
    {"Bootshaus",-2267.4692,2428.9053,4.9813,-2324.4094,2299.5740,-0.1233,181.7380,0,"San Fierro"},
    {"Flugzeug und Heli Autohaus",2020.4681,-2630.5430,13.5469,1989.3278,-2382.5083,14.4679,90.0296}
    };

  • Kann ich.
    Es gibt bei dir sowohl in AHinfo als auch in AKinfo den Namen posx,posy und posz. Das verwirrt den Compiler.
    Du müsstest es umbennen,damit über den Namen eindeutig ist, zu welchem enum ist gehört. Das Gleiche Problem hast du dort auch mit "Name".


    Zum Beispiel bei Autohaus vor posx,posy und posz ein Präfix setzen ( z.B. ah_ ) :
    ah_posx,ah_posy,ah_posz.
    Das müsstest du dann allerdings überall im Code anpassen bei Autohaus.


    Übrigens,wieso hast du in 4 Zeilen bei Autohaus am Ende noch einen String ?


    //Edit:
    Hab gerade nochmal etwas ausprobiert. Du musst o.g. nicht tun, folgendes klappt auch:
    CreatePickup(1239,1,Autohaus[i][AHinfo:posx],Autohaus[i][AHinfo:posy],Autohaus[i][AHinfo:posz],1); //Tag mismatch

    Einmal editiert, zuletzt von Goldkiller ()