Problem - Autohaus

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
  • Hallöchen,
    ich habe das Problem ich bekomme 4 Errors, und weiß nicht warum:


    Code
    C:\SA-MP Server\gamemodes\KA-1-0-0.pwn(609) : error 001: expected token: ";", but found "{"
    C:\SA-MP Server\gamemodes\KA-1-0-0.pwn(621) : error 010: invalid function or declaration
    C:\SA-MP Server\gamemodes\KA-1-0-0.pwn(633) : error 001: expected token: ";", but found "{"
    C:\SA-MP Server\gamemodes\KA-1-0-0.pwn(668) : error 010: invalid function or declaration

    die Zeilen:

    new Float:DtcParkPlatz[AUTOHAUSER][MAXPARKPLATZE][4] =
    {
    {//Autohaus (LS)
    {1275.6222,-1655.7703,13.2518,269.5589},
    {1275.6222,-1655.7703,13.2518,269.5589},
    {1275.6222,-1655.7703,13.2518,269.5589},
    {1275.6222,-1655.7703,13.2518,269.5589},
    },
    {//Flugzeug-Shop
    {-1585.2198,1229.2092,6.8937,180.0},
    {-1581.2231,1229.1381,6.8926,180.0},
    {-1577.4001,1229.0983,6.8943,180.0},
    {-1573.0222,1229.0796,6.8924,180.0},
    },
    {//Bootsautohaus
    {1120.5925,-1390.000,13.2414,90.000},
    {1130.1421,-1390.000,13.2939,90.000},
    {1140.1067,-1390.000,13.3526,90.000},
    {1150.2216,-1390.000,13.4119,90.000}
    }
    };


    MfG

  • @Jeffry


    Bekomme immer noch die Errors:

    Code
    C:\SA-MP Server\gamemodes\KA-1-0-0.pwn(609) : error 001: expected token: ";", but found "{"
    C:\SA-MP Server\gamemodes\KA-1-0-0.pwn(621) : error 010: invalid function or declaration
    C:\SA-MP Server\gamemodes\KA-1-0-0.pwn(633) : error 001: expected token: ";", but found "{"
    C:\SA-MP Server\gamemodes\KA-1-0-0.pwn(668) : error 010: invalid function or declaration

    ich hoffe du meintest es so:

    new Float:DtcParkPlatz[AUTOHAUSER][MAXPARKPLATZE][4] =
    {
    {//Autohaus (LS)
    {1275.6222,-1655.7703,13.2518,269.5589},
    {1275.6222,-1655.7703,13.2518,269.5589},
    {1275.6222,-1655.7703,13.2518,269.5589},
    {1275.6222,-1655.7703,13.2518,269.5589}
    },
    {//Flugzeug-Shop
    {-1585.2198,1229.2092,6.8937,180.0},
    {-1581.2231,1229.1381,6.8926,180.0},
    {-1577.4001,1229.0983,6.8943,180.0},
    {-1573.0222,1229.0796,6.8924,180.0}
    },
    {//Bootsautohaus
    {1120.5925,-1390.000,13.2414,90.000},
    {1130.1421,-1390.000,13.2939,90.000},
    {1140.1067,-1390.000,13.3526,90.000},
    {1150.2216,-1390.000,13.4119,90.000}
    }
    };

  • @Jeffry
    also die Errors nochmal:


    Code
    C:\SA-MP Server\gamemodes\KA-1-0-0.pwn(617) : error 001: expected token: ";", but found "{"
    C:\SA-MP Server\gamemodes\KA-1-0-0.pwn(623) : error 010: invalid function or declaration
    C:\SA-MP Server\gamemodes\KA-1-0-0.pwn(649) : error 001: expected token: ";", but found "{"
    C:\SA-MP Server\gamemodes\KA-1-0-0.pwn(656) : error 010: invalid function or declaration

    die Zeilen nun:
    [pwn=598]
    new Float:DtcParkPlatz[AUTOHAUSER][MAXPARKPLATZE][4] = {
    {//2-Rad Händler
    {-1273.7734,-619.1137,15.0676,1.3637},
    {-1335.2343,-616.5912,15.0635,1.9247},
    {-1395.5461,-619.2031,15.0707,2.6078},
    {-1457.6953,-619.0181,15.0707,1.6967}
    },
    {//Autohaus (LS)
    {1275.6222,-1655.7703,13.2518,269.5589},
    {1275.6222,-1655.7703,13.2518,269.5589},
    {1275.6222,-1655.7703,13.2518,269.5589},
    {1275.6222,-1655.7703,13.2518,269.5589}
    },
    {//Flugzeughändler
    {-1273.7734,-619.1137,15.0676,1.3637},
    {-1335.2343,-616.5912,15.0635,1.9247},
    {-1395.5461,-619.2031,15.0707,2.6078},
    {-1457.6953,-619.0181,15.0707,1.6967}
    },
    {//Bootshändler
    {-135.2207, -1802.6097, -0.5573, 258.9006},
    {-129.8378, -1779.3202, -0.5242, 256.1195},
    {-125.4116, -1760.9236, -0.6199, 256.4629},
    {-121.0805, -1742.9702, -0.7924, 256.4629}
    }
    };




    new Float:DtcSonstiges[AUTOHAUSER][5][3] = {
    {//2-Rad Händler
    {562.9924,-1292.6725,17.2482,0.0}, // Info Zeichen etc.
    {540.9376,-1298.4076,32.1380,318.0749}, // LiveView Car
    {547.1100,-1297.5990,32.5406,0.0}, // LiveView Cam
    {547.1100,-1297.5990,32.5406,0.0}, // LiveView Player
    {554.7096,-1278.0496,17.2482} // LiveView Player Exit
    },
    {//Autohaus (LS)
    {562.9924,-1292.6725,17.2482,0.0}, // Info Zeichen etc.
    {540.9376,-1298.4076,32.1380,318.0749}, // LiveView Car
    {547.1100,-1297.5990,32.5406,0.0}, // LiveView Cam
    {547.1100,-1297.5990,32.5406,0.0}, // LiveView Player
    {554.7096,-1278.0496,17.2482} // LiveView Player Exit
    },
    {//Flugzeughändler
    {-1365.0568,-641.4794,14.1484,178.2833}, // Info Zeichen etc.
    {-1351.8582,-356.0417,26.3576,3.6795}, // LiveView Car
    {-1353.4139,-336.7994,25.4375,184.0823}, // LiveView Cam
    {-1359.5854,-335.6806,25.4375,3.8567}, // LiveView Player
    {-1364.7587,-635.5377,14.1484,359.9140} // LiveView Player Exit
    },
    {//Bootshändler
    {-206.7942, -1778.8412, 1.8197, 0.0}, //Infozeichen
    {1248.7789, -2382.5952, 8.3920, 0.0}, // liveView Car
    {1241.7362, -2390.6350, 12.4744, 0.0}, //Campos
    {1222.8789, -2415.5544, 10.2585, 0.0},//playapos
    {-147.2765, -1789.9833, 1.1003, 0.0} //Exit view
    }
    };
    [/pwn]


    Habe es mal ein bisschen erweitert, nicht wundern.

  • Probier es mal so:


  • Der Code ist korrekt, bei mir kompiliert das problemlos.
    Ich schätze, dass die Werte, die AUTOHAUSER und MAXPARKPLATZE haben nicht passen.



    Du könntest es auch einfach zu dem hier ändern:
    new Float:DtcParkPlatz[][][] = {
    Gleich beim anderen.


    Bei vorbelegten Arrays muss die Größe nicht angegeben werden, da dies von der Vorbelegung her klar wird.