Wodran liegen diese Fehler?

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
  • Also ich habe folgende fehler:



    C:\DOKUME~1\Nico\Desktop\ALLESA~1\AKTUEL~1.(AN\GAMEMO~1\Reallife.pwn(1990) : error 017: undefined symbol "Busfahrt_Stationen"
    C:\DOKUME~1\Nico\Desktop\ALLESA~1\AKTUEL~1.(AN\GAMEMO~1\Reallife.pwn(1990) : error 029: invalid expression, assumed zero
    C:\DOKUME~1\Nico\Desktop\ALLESA~1\AKTUEL~1.(AN\GAMEMO~1\Reallife.pwn(1998) : error 029: invalid expression, assumed zero
    C:\DOKUME~1\Nico\Desktop\ALLESA~1\AKTUEL~1.(AN\GAMEMO~1\Reallife.pwn(2224) : warning 235: public function lacks forward declaration (symbol "missionfailedbus")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    3 Errors.



    So hier die Zeilen:





    public OnPlayerEnterCheckpoint(playerid)
    {
    new
    string[128];
    Checkpoint[playerid]++;
    if(Checkpoint[playerid]==sizeof(Muellabfuhr_Stationen)) {
    SendClientMessage(playerid, COLOR_RED, "Herzlichen Glueckwunsch, und danke das du hilfst die Stadt sauber zu halten!");
    DisablePlayerCheckpoint(playerid);
    GivePlayerMoney(playerid, 150);
    SendClientMessage(playerid, COLOR_RED, "Du bekommst einen kleinen Bonus von 150$");
    mission[playerid]=false;
    }


    else {


    new
    trinkgeld = random(45);
    SendClientMessage(playerid, COLOR_RED, "Muell aufgeladen, weiter!");
    format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
    GivePlayerMoney(playerid,trinkgeld);
    SendClientMessage(playerid, COLOR_GREEN, string);
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[Checkpoint[playerid]][X],Muellabfuhr_Stationen[Checkpoint[playerid]][Y],Muellabfuhr_Stationen[Checkpoint[playerid]][Z],Muellabfuhr_Stationen[Checkpoint[playerid]][Rad]);
    }


    new

    string2[128];
    Checkpoint2[playerid]++;
    if(Checkpoint2[playerid]==sizeof(Busfahrt_Stationen)) {
    SendClientMessage(playerid, COLOR_RED, "Herzlichen Glueckwunsch, danke das du anderen hilfst!");
    DisablePlayerCheckpoint(playerid);
    GivePlayerMoney(playerid, 150);
    SendClientMessage(playerid, COLOR_RED, "Du bekommst einen kleinen Bonus von 150$");
    mission[playerid]=false;
    }


    else {


    new
    trinkgeld = random(20);
    SendClientMessage(playerid, COLOR_RED, "Station erreicht, weiter!");
    format(string2, sizeof(string2), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
    GivePlayerMoney(playerid,trinkgeld);
    SendClientMessage(playerid, COLOR_GREEN, string);
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[Checkpoint[playerid]][X],Muellabfuhr_Stationen[Checkpoint[playerid]][Y],Muellabfuhr_Stationen[Checkpoint[playerid]][Z],Muellabfuhr_Stationen[Checkpoint[playerid]][Rad]);
    }


    return 1;
    }



    Womit kann ich die beheben?
    Schonmal danke im Vorraus

  • Ja hier:




    new
    Busfahrer_Stationen[][e_Muell] = {
    {1143.7667, -1395.3564, 13.5234, 6.0},
    {1082.3110, -1395.6605, 13.5186, 6.0},
    {1058.4822, -1444.7924, 13.3612, 6.0},
    {1035.6115, -1587.1553, 13.3828, 6.0},
    {1035.7239, -1697.4884, 13.3828, 6.0},
    {1231.2714, -1715.0936, 13.3828, 6.0},
    {1296.0723, -1839.8368, 13.3828, 6.0},
    {1515.7316, -1874.7427, 13.3828, 6.0},
    {1692.6337, -1833.9587, 13.3828, 6.0},
    {1777.5909, -1831.7139, 13.3828, 6.0},
    {1824.8978, -1777.4548, 13.3828, 6.0},
    {1958.8987, -1755.2705, 13.3906, 6.0},
    {2076.5581, -1754.8265, 13.3828, 6.0},
    {2114.0256, -1688.2156, 13.3811, 6.0},
    {2114.6709, -1494.1471, 23.8084, 6.0},
    {2062.9055, -1457.9771, 21.4030, 6.0},
    {1824.8466, -1457.0355, 13.3637, 6.0},
    {1740.0948, -1437.8489, 13.3644, 6.0},
    {1516.5922, -1438.0916, 13.3828, 6.0},
    {1422.7786, -1410.9045, 13.3828, 6.0},
    {1360.2563, -1381.3911, 13.5001, 6.0},
    {1363.9519, -1244.6146, 13.3828, 6.0},
    {1442.7817, -1242.5287, 13.3828, 6.0},
    {1456.4077, -1172.5852, 23.7275, 6.0},
    {1369.9813, -1138.5244, 23.6563, 6.0},
    {1342.5331, -1161.5752, 23.7177, 6.0},
    {1339.6934, -1304.0051, 13.4995, 6.0},
    {1339.6465, -1382.4232, 13.5140, 6.0},
    {1327.5094, -1393.0409, 13.3735, 6.0},
    {1126.4036, -1388.7040, 13.7088, 6.0}//Station 30
    };


  • new Busfahrer_Stationen[e_Muell] = {
    {1143.7667, -1395.3564, 13.5234, 6.0},
    {1082.3110, -1395.6605, 13.5186, 6.0},
    {1058.4822, -1444.7924, 13.3612, 6.0},
    {1035.6115, -1587.1553, 13.3828, 6.0},
    {1035.7239, -1697.4884, 13.3828, 6.0},
    {1231.2714, -1715.0936, 13.3828, 6.0},
    {1296.0723, -1839.8368, 13.3828, 6.0},
    {1515.7316, -1874.7427, 13.3828, 6.0},
    {1692.6337, -1833.9587, 13.3828, 6.0},
    {1777.5909, -1831.7139, 13.3828, 6.0},
    {1824.8978, -1777.4548, 13.3828, 6.0},
    {1958.8987, -1755.2705, 13.3906, 6.0},
    {2076.5581, -1754.8265, 13.3828, 6.0},
    {2114.0256, -1688.2156, 13.3811, 6.0},
    {2114.6709, -1494.1471, 23.8084, 6.0},
    {2062.9055, -1457.9771, 21.4030, 6.0},
    {1824.8466, -1457.0355, 13.3637, 6.0},
    {1740.0948, -1437.8489, 13.3644, 6.0},
    {1516.5922, -1438.0916, 13.3828, 6.0},
    {1422.7786, -1410.9045, 13.3828, 6.0},
    {1360.2563, -1381.3911, 13.5001, 6.0},
    {1363.9519, -1244.6146, 13.3828, 6.0},
    {1442.7817, -1242.5287, 13.3828, 6.0},
    {1456.4077, -1172.5852, 23.7275, 6.0},
    {1369.9813, -1138.5244, 23.6563, 6.0},
    {1342.5331, -1161.5752, 23.7177, 6.0},
    {1339.6934, -1304.0051, 13.4995, 6.0},
    {1339.6465, -1382.4232, 13.5140, 6.0},
    {1327.5094, -1393.0409, 13.3735, 6.0},
    {1126.4036, -1388.7040, 13.7088, 6.0}//Station 30
    };

  • Ok ich habe jetzt immernoch ein paar error's:




    C:\DOKUME~1\Nico\Desktop\ALLESA~1\AKTUEL~1.(AN\GAMEMO~1\Reallife.pwn(1991) : error 017: undefined symbol "Busfahrt_Stationen"
    C:\DOKUME~1\Nico\Desktop\ALLESA~1\AKTUEL~1.(AN\GAMEMO~1\Reallife.pwn(1991) : error 029: invalid expression, assumed zero
    C:\DOKUME~1\Nico\Desktop\ALLESA~1\AKTUEL~1.(AN\GAMEMO~1\Reallife.pwn(1999) : error 029: invalid expression, assumed zero
    C:\DOKUME~1\Nico\Desktop\ALLESA~1\AKTUEL~1.(AN\GAMEMO~1\Reallife.pwn(2225) : error 025: function heading differs from prototype
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.



    Hier die Zeilen



    new

    string2[128];
    Checkpoint2[playerid]++;
    if(Checkpoint2[playerid]==sizeof(Busfahrt_Stationen)) { //Zeile 1991
    SendClientMessage(playerid, COLOR_RED, "Herzlichen Glueckwunsch, danke das du anderen hilfst!");
    DisablePlayerCheckpoint(playerid);
    GivePlayerMoney(playerid, 150);
    SendClientMessage(playerid, COLOR_RED, "Du bekommst einen kleinen Bonus von 150$");
    mission[playerid]=false;
    }


    else { //Zeile 1999


    new
    trinkgeld = random(20);
    SendClientMessage(playerid, COLOR_RED, "Station erreicht, weiter!");
    format(string2, sizeof(string2), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
    GivePlayerMoney(playerid,trinkgeld);
    SendClientMessage(playerid, COLOR_GREEN, string);
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[Checkpoint[playerid]][X],Muellabfuhr_Stationen[Checkpoint[playerid]][Y],Muellabfuhr_Stationen[Checkpoint[playerid]][Z],Muellabfuhr_Stationen[Checkpoint[playerid]][Rad]);
    }


    return 1;
    }




    public missionfailedbus(playerid) { //Zeile 2225
    new
    vehicleid = GetPlayerVehicleID(playerid),
    model = GetVehicleModel(vehicleid);
    if(model!=431) {
    SendClientMessage(playerid, COLOR_RED, "Busfahrt gescheitert!");
    DisablePlayerCheckpoint(playerid);
    mission[playerid]=false;
    }
    return 1;
    }

  • Versuchs mal so


    new


    string2[128];
    Checkpoint2[playerid]++;
    //Zeile 1991
    if(Checkpoint2[playerid]==sizeof(Busfahrer_Stationen))
    {
    SendClientMessage(playerid, COLOR_RED, "Herzlichen Glueckwunsch, danke das du anderen hilfst!");
    DisablePlayerCheckpoint(playerid);
    GivePlayerMoney(playerid, 150);
    SendClientMessage(playerid, COLOR_RED, "Du bekommst einen kleinen Bonus von 150$");
    mission[playerid]=false;
    }



    return false;


    new
    trinkgeld = random(20);
    SendClientMessage(playerid, COLOR_RED, "Station erreicht, weiter!");
    format(string2, sizeof(string2), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
    GivePlayerMoney(playerid,trinkgeld);
    SendClientMessage(playerid, COLOR_GREEN, string);
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[Checkpoint[playerid]][X],Muellabfuhr_Stationen[Checkpoint[playerid]] [Y],Muellabfuhr_Stationen[Checkpoint[playerid]][Z],Muellabfuhr_Stationen[Checkpoint[playerid]][Rad]);
    }



    return 1;
    }

    Einmal editiert, zuletzt von Lowged ()

  • new

    string2[128];
    Checkpoint2[playerid]++;
    if(Checkpoint2[playerid]==sizeof(Busfahrer_Stationen)) { //Zeile 1991
    SendClientMessage(playerid, COLOR_RED, "Herzlichen Glueckwunsch, danke das du anderen hilfst!");
    DisablePlayerCheckpoint(playerid);
    GivePlayerMoney(playerid, 150);
    SendClientMessage(playerid, COLOR_RED, "Du bekommst einen kleinen Bonus von 150$");
    mission[playerid]=false;
    }
    return false;


    new
    trinkgeld = random(20);
    SendClientMessage(playerid, COLOR_RED, "Station erreicht, weiter!");
    format(string2, sizeof(string2), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
    GivePlayerMoney(playerid,trinkgeld);
    SendClientMessage(playerid, COLOR_GREEN, string);
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[Checkpoint[playerid]][X],Muellabfuhr_Stationen[Checkpoint[playerid]] [Y],Muellabfuhr_Stationen[Checkpoint[playerid]][Z],Muellabfuhr_Stationen[Checkpoint[playerid]][Rad]);
    }


    return 1;
    }


    Probiers mal so normalerweiße wen er den error anzeigt braucht er die else nicht oO

    Der Server: [GRG]Grand Racing Game wurde 2014 Eingestampft.
    Weitere Infos: Klick Mich

  • new string2[128]; Checkpoint2[playerid]++; if(Checkpoint2[playerid]==sizeof(Busfahrer_Stationen)) { //Zeile 1991 SendClientMessage(playerid, COLOR_RED, "Herzlichen Glueckwunsch, danke das du anderen hilfst!"); DisablePlayerCheckpoint(playerid); GivePlayerMoney(playerid, 150); SendClientMessage(playerid, COLOR_RED, "Du bekommst einen kleinen Bonus von 150$"); mission[playerid]=false; } return false; new trinkgeld = random(20); SendClientMessage(playerid, COLOR_RED, "Station erreicht, weiter!"); format(string2, sizeof(string2), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld); GivePlayerMoney(playerid,trinkgeld); SendClientMessage(playerid, COLOR_GREEN, string); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[Checkpoint[playerid]][X],Muellabfuhr_Stationen[Checkpoint[playerid]] [Y],Muellabfuhr_Stationen[Checkpoint[playerid]][Z],Muellabfuhr_Stationen[Checkpoint[playerid]][Rad]); } return 1; }


    Also dann kommen folgende fehler:



    C:\DOKUME~1\Nico\Desktop\ALLESA~1\AKTUEL~1.(AN\GAMEMO~1\Reallife.pwn(2001) : warning 225: unreachable code
    C:\DOKUME~1\Nico\Desktop\ALLESA~1\AKTUEL~1.(AN\GAMEMO~1\Reallife.pwn(2009) : warning 209: function "OnPlayerEnterCheckpoint" should return a value
    C:\DOKUME~1\Nico\Desktop\ALLESA~1\AKTUEL~1.(AN\GAMEMO~1\Reallife.pwn(2011) : error 010: invalid function or declaration
    C:\DOKUME~1\Nico\Desktop\ALLESA~1\AKTUEL~1.(AN\GAMEMO~1\Reallife.pwn(2225) : error 025: function heading differs from prototype
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.

  • Oh ich dachte ich hätte Sie ebend schon angehängt^^




    new


    string2[128];
    Checkpoint2[playerid]++;
    if(Checkpoint2[playerid]==sizeof(Busfahrer_Stationen)) {
    SendClientMessage(playerid, COLOR_RED, "Herzlichen Glueckwunsch, danke das du anderen hilfst!");
    DisablePlayerCheckpoint(playerid);
    GivePlayerMoney(playerid, 150);
    SendClientMessage(playerid, COLOR_RED, "Du bekommst einen kleinen Bonus von 150$");
    mission[playerid]=false;
    }
    return false;




    new //2001
    trinkgeld = random(20);
    SendClientMessage(playerid, COLOR_RED, "Station erreicht, weiter!");
    format(string2, sizeof(string2), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
    GivePlayerMoney(playerid,trinkgeld);
    SendClientMessage(playerid, COLOR_GREEN, string);
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[Checkpoint[playerid]][X],Muellabfuhr_Stationen[Checkpoint[playerid]] [Y],Muellabfuhr_Stationen[Checkpoint[playerid]][Z],Muellabfuhr_Stationen[Checkpoint[playerid]][Rad]);
    } //2009


    return 1; //2011
    }




    public missionfailedbus(playerid) { //Zeile 2225
    new
    vehicleid = GetPlayerVehicleID(playerid),
    model = GetVehicleModel(vehicleid);
    if(model!=431) {
    SendClientMessage(playerid, COLOR_RED, "Busfahrt gescheitert!");
    DisablePlayerCheckpoint(playerid);
    mission[playerid]=false;
    }
    return 1;
    }

  • forward missionfailedbus(playerid);
    einmal
    newstring2[128];
      Checkpoint2[playerid]++;
      if(Checkpoint2[playerid]==sizeof(Busfahrer_Stationen)) {
      SendClientMessage(playerid, COLOR_RED, "Herzlichen Glueckwunsch, danke das du anderen hilfst!");
      DisablePlayerCheckpoint(playerid);
      GivePlayerMoney(playerid, 150);
      SendClientMessage(playerid, COLOR_RED, "Du bekommst einen kleinen Bonus von 150$");
      mission[playerid]=false;
      }
      return false;
      }  new trinkgeld = random(20);
      SendClientMessage(playerid, COLOR_RED, "Station erreicht, weiter!");
      format(string2, sizeof(string2), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
      GivePlayerMoney(playerid,trinkgeld);
      SendClientMessage(playerid, COLOR_GREEN, string);
      DisablePlayerCheckpoint(playerid);
      SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[Checkpoint[playerid]][X],Muellabfuhr_Stationen[Checkpoint[playerid]] [Y],Muellabfuhr_Stationen[Checkpoint[playerid]][Z],Muellabfuhr_Stationen[Checkpoint[playerid]][Rad]);
      } //2009


      return 1; //2011
    }


    Zwei

    Der Server: [GRG]Grand Racing Game wurde 2014 Eingestampft.
    Weitere Infos: Klick Mich


  • Wenn man das so compilen will stürzt der Compiler ab o.O^^

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen