Habe 2 Errrors Hilfe :)

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 Habe 2 Errors bei meinem Pfandsystem


    enum pfsys{
    Float:PosX,
    Float:PosY,
    Float:PosZ,
    };
    new PfandSystem[pfsys]={
    /*PosX PosY PosZ*/
    {1499.3876, -1620.3722, 13.3687},
    {1620.60254, -1897.31104, 13.05440},
    {1622.50647, -1582.94775, 13.33080},
    {1310.29663, -876.22614, 39.22170}, //Zeile 121
    {1328.61829, -1196.42517, 23.17120},
    {2280.84839, -1695.28308, 13.29210},
    {2456.25952, -1758.96216, 13.20840},
    {2846.05078, -1278.64905, 19.84890},
    {2684.34497, -1113.71289, 68.99410},
    {2205.75317, -987.67828, 63.42230},
    {1695.73206, -1370.26050, 16.95210},
    {1726.86890, -1475.49487, 13.06600},
    {1726.47266, -2082.32739, 13.22510},
    {2148.34644, -2528.89038, 13.20790},
    {820.53229, -2050.81787, 12.40500},
    {384.36447, -1879.73730, 2.28190},
    {149.64470, -1948.60303, 3.43780},
    {305.60901, -1554.78943, 35.69781},
    {775.43359, -1120.37329, 23.52030},
    {359.13321, -1278.92017, 53.35493}
    /* ------------------
    * Function forwards:
    -------------------*/


    //Das Drunter hat eig nichts mit Pfandsystem zutun...
    // Public:
    forward CallElevator(playerid, floorid); // Zeile 144
    forward ShowElevatorDialog(playerid);
    forward ProxDetectorS(Float:radi, playerid, targetid);


    So heißen doie Errors


    C:\Users\Viktor\Desktop\DatenSicherung\MRM\gamemodes\MrM---MrMonatReallife.pwn(118) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Viktor\Desktop\DatenSicherung\MRM\gamemodes\MrM---MrMonatReallife.pwn(119) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Viktor\Desktop\DatenSicherung\MRM\gamemodes\MrM---MrMonatReallife.pwn(120) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Viktor\Desktop\DatenSicherung\MRM\gamemodes\MrM---MrMonatReallife.pwn(121) : error 008: must be a constant expression; assumed zero
    C:\Users\Viktor\Desktop\DatenSicherung\MRM\gamemodes\MrM---MrMonatReallife.pwn(144) : error 029: invalid expression, assumed zero


    //Edit
    Hat Niemand ne Anhung?

  • Da fehlt doch eine Klammer
    new PfandSystem[pfsys]={
    /*PosX PosY PosZ*/
    {1499.3876, -1620.3722, 13.3687},
    {1620.60254, -1897.31104, 13.05440},
    {1622.50647, -1582.94775, 13.33080},
    {1310.29663, -876.22614, 39.22170}, //Zeile 121
    {1328.61829, -1196.42517, 23.17120},
    {2280.84839, -1695.28308, 13.29210},
    {2456.25952, -1758.96216, 13.20840},
    {2846.05078, -1278.64905, 19.84890},
    {2684.34497, -1113.71289, 68.99410},
    {2205.75317, -987.67828, 63.42230},
    {1695.73206, -1370.26050, 16.95210},
    {1726.86890, -1475.49487, 13.06600},
    {1726.47266, -2082.32739, 13.22510},
    {2148.34644, -2528.89038, 13.20790},
    {820.53229, -2050.81787, 12.40500},
    {384.36447, -1879.73730, 2.28190},
    {149.64470, -1948.60303, 3.43780},
    {305.60901, -1554.78943, 35.69781},
    {775.43359, -1120.37329, 23.52030},
    {359.13321, -1278.92017, 53.35493},
    };


    //Edit Semikolon auch noch ^^

  • Jetzt habe ich dn


    C:\Users\Viktor\Desktop\DatenSicherung\MRM\gamemodes\MrM---MrMonatReallife.pwn(121) : error 008: must be a constant expression; assumed zero


    //edit


    new PfandSystem[pfsys]={
    /*PosX PosY PosZ*/
    {1499.3876, -1620.3722, 13.3687},
    {1620.60254, -1897.31104, 13.05440},
    {1622.50647, -1582.94775, 13.33080},
    {1310.29663, -876.22614, 39.22170}, //Zeile 121
    {1328.61829, -1196.42517, 23.17120},
    {2280.84839, -1695.28308, 13.29210},
    {2456.25952, -1758.96216, 13.20840},
    {2846.05078, -1278.64905, 19.84890},
    {2684.34497, -1113.71289, 68.99410},
    {2205.75317, -987.67828, 63.42230},
    {1695.73206, -1370.26050, 16.95210},
    {1726.86890, -1475.49487, 13.06600},
    {1726.47266, -2082.32739, 13.22510},
    {2148.34644, -2528.89038, 13.20790},
    {820.53229, -2050.81787, 12.40500},
    {384.36447, -1879.73730, 2.28190},
    {149.64470, -1948.60303, 3.43780},
    {305.60901, -1554.78943, 35.69781},
    {775.43359, -1120.37329, 23.52030},
    {359.13321, -1278.92017, 53.35493}
    };

  • hmm :( weiß niemand was es sein könnte?


    //edit
    Hier nochmal


    enum pfsys{
    Float:PosX,
    Float:PosY,
    Float:PosZ,
    };
    new PfandSystem[pfsys]={
    {1499.3876, -1620.3722, 13.3687},
    {1620.60254, -1897.31104, 13.05440},
    {1622.50647, -1582.94775, 13.33080},
    {1310.29663, -876.22614, 39.22170}, //Zeile 121
    {1328.61829, -1196.42517, 23.17120},
    {2280.84839, -1695.28308, 13.29210},
    {2456.25952, -1758.96216, 13.20840},
    {2846.05078, -1278.64905, 19.84890},
    {2684.34497, -1113.71289, 68.99410},
    {2205.75317, -987.67828, 63.42230},
    {1695.73206, -1370.26050, 16.95210},
    {1726.86890, -1475.49487, 13.06600},
    {1726.47266, -2082.32739, 13.22510},
    {2148.34644, -2528.89038, 13.20790},
    {820.53229, -2050.81787, 12.40500},
    {384.36447, -1879.73730, 2.28190},
    {149.64470, -1948.60303, 3.43780},
    {305.60901, -1554.78943, 35.69781},
    {775.43359, -1120.37329, 23.52030},
    {359.13321, -1278.92017, 53.35493},
    };


    C:\Users\Viktor\Desktop\DatenSicherung\MRM\gamemodes\MrM---MrMonatReallife.pwn(120) : error 008: must be a constant expression; assumed zero

    Einmal editiert, zuletzt von Mr.iBuzziN ()

  • Die Funktion sollte schon die sein
    enum pfsys{
    Float:PosX,
    Float:PosY,
    Float:PosZ,
    };
    new PfandSystem[][pfsys]={//hier noch ein []
    {1499.3876, -1620.3722, 13.3687},
    {1620.60254, -1897.31104, 13.05440},
    {1622.50647, -1582.94775, 13.33080},
    {1310.29663, -876.22614, 39.22170}, //Zeile 121
    {1328.61829, -1196.42517, 23.17120},
    {2280.84839, -1695.28308, 13.29210},
    {2456.25952, -1758.96216, 13.20840},
    {2846.05078, -1278.64905, 19.84890},
    {2684.34497, -1113.71289, 68.99410},
    {2205.75317, -987.67828, 63.42230},
    {1695.73206, -1370.26050, 16.95210},
    {1726.86890, -1475.49487, 13.06600},
    {1726.47266, -2082.32739, 13.22510},
    {2148.34644, -2528.89038, 13.20790},
    {820.53229, -2050.81787, 12.40500},
    {384.36447, -1879.73730, 2.28190},
    {149.64470, -1948.60303, 3.43780},
    {305.60901, -1554.78943, 35.69781},
    {775.43359, -1120.37329, 23.52030},
    {359.13321, -1278.92017, 53.35493}//das Komma weg
    };


    wenn du alle furchlaufen willst, dann machst du es so:
    for(new i = 0; i < sizeof(PfandSystem); i++)
    {
    //der Code hier
    }

    All in all it's just another brick in the wall