Compailer Stürtz ab obwohl Klammern richtig zu sind

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, wie mein thema schon sagt mein Compailer Stützt ab und meine klammern sind alle richtig.


    Code:
    public Carinfo(playerid)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    new vid = GetNearestCar(playerid, 3.0);
    if(vid!=INVALID_CAR)
    {
    new szString[32];
    format(szString,sizeof(szString), "Carid: %d",vid);
    format(szString,sizeof(szString), "Besitzer: %s",CarInfo[vid][cOwner]);
    format(szString, sizeof(szString), "Kennzeichen: %s", CarInfo[vid][cKennzeichen]);
    if(CarInfo[vid][cType]==POLIZEI) format(szString, sizeof(szString), "Firma: Polizei");
    else if(CarInfo[vid][cType]==TAXI) format(szString, sizeof(szString), "Firma: Taxi");
    else if(CarInfo[vid][cType]==FAHRSCHULE) format(szString, sizeof(szString), "Firma: Fahrschule");
    else if(CarInfo[vid][cType]==FLUGSCHULE) format(szString, sizeof(szString), "Firma: Flugschule");
    else if(CarInfo[vid][cType]==ADAC) format(szString, sizeof(szString), "Firma: ADAC");
    else if(CarInfo[vid][cType]==OTTO) format(szString, sizeof(szString), "Firma: Otto's Cars");
    else if(CarInfo[vid][cType]==WANG) format(szString, sizeof(szString), "Firma: Wang Cars");
    else if(CarInfo[vid][cType]==FEUER) format(szString, sizeof(szString), "Firma: Feuerwehr");
    else if(CarInfo[vid][cType]==MEDIC) format(szString, sizeof(szString), "Firma: Krankenhaus");
    else if(CarInfo[vid][cType]==TANKER) format(szString, sizeof(szString), "Firma: Oil Company");
    else if(CarInfo[vid][cType]==SPEDITION) format(szString, sizeof(szString), "Firma: Spedition");
    else if(CarInfo[vid][cType]==POST) format(szString, sizeof(szString), "Firma: Post");
    else if(CarInfo[vid][cType]==MULL) format(szString, sizeof(szString), "Firma: Muelldeponie");
    else if(CarInfo[vid][cType]==NEWS) format(szString, sizeof(szString), "Firma: Los Santos Times");
    else if(CarInfo[vid][cType]==BOOT) format(szString, sizeof(szString), "Firma: Los Santos Boote");
    else if(CarInfo[vid][cType]==CREED) format(szString, sizeof(szString), "Firma: Autoverleih");
    else if(CarInfo[vid][cType]==HELISHOP) format(szString, sizeof(szString), "Firma: Heli / Flugzeugshop");
    else if(CarInfo[vid][cType]==BANKER) format(szString, sizeof(szString), "Firma: Bank");
    else if(CarInfo[vid][cType]==RUSSIAN) format(szString, sizeof(szString), "Firma: RUSSIAN Mafia");
    else if(CarInfo[vid][cType]==MOPED) format(szString, sizeof(szString), "Firma: Motorradshop");
    else if(CarInfo[vid][cType]==YAKUZA) format(szString, sizeof(szString), "Firma: Yakuza's");
    else if(CarInfo[vid][cType]==TRIAD) format(szString, sizeof(szString), "Firma: Triaden");
    else if(CarInfo[vid][cType]==AUTOLIEFERER)format(szString, sizeof(szString), "Firma: Autolieferung");
    else if(CarInfo[vid][cType]==PARKHAUS) format(szString, sizeof(szString), "Firma: Parkhaus");
    else if(CarInfo[vid][cType]==BIKER) format(szString, sizeof(szString), "Firma: Biker"); // BIKER
    else if(CarInfo[vid][cType]==Wasser) format(szString, sizeof(szString), "Firma: WasserGrenzSchutz"); // BIKER
    else if(CarInfo[vid][cType]==GROTTI) format(szString, sizeof(szString), "Firma: GrottiCars");
    else if(CarInfo[vid][cType]==shody) format(szString, sizeof(szString), "Firma: ShodysCars");
    else format(szString, sizeof(szString), "Firma: Keine");;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Du befindest dich nicht in der Nähe eines Autos.");
    }
    }
    else
    {
    new vid = GetPlayerVehicleID(playerid);
    new szString[32];
    format(szString,sizeof(szString), "Carid: %d",vid);
    format(szString,sizeof(szString), "Besitzer: %s",CarInfo[vid][cOwner]);
    format(szString, sizeof(szString), "Kennzeichen: %s", CarInfo[vid][cKennzeichen]);
    if(CarInfo[vid][cType]==POLIZEI) format(szString, sizeof(szString), "Firma: Polizei");
    else if(CarInfo[vid][cType]==TAXI) format(szString, sizeof(szString), "Firma: Taxi");
    else if(CarInfo[vid][cType]==FAHRSCHULE) format(szString, sizeof(szString), "Firma: Fahrschule");
    else if(CarInfo[vid][cType]==FLUGSCHULE) format(szString, sizeof(szString), "Firma: Flugschule");
    else if(CarInfo[vid][cType]==ADAC) format(szString, sizeof(szString), "Firma: ADAC");
    else if(CarInfo[vid][cType]==OTTO) format(szString, sizeof(szString), "Firma: Otto's Cars");
    else if(CarInfo[vid][cType]==WANG) format(szString, sizeof(szString), "Firma: Wang Cars");
    else if(CarInfo[vid][cType]==FEUER) format(szString, sizeof(szString), "Firma: Feuerwehr");
    else if(CarInfo[vid][cType]==MEDIC) format(szString, sizeof(szString), "Firma: Krankenhaus");
    else if(CarInfo[vid][cType]==TANKER) format(szString, sizeof(szString), "Firma: Oil Company");
    else if(CarInfo[vid][cType]==SPEDITION) format(szString, sizeof(szString), "Firma: Spedition");
    else if(CarInfo[vid][cType]==POST) format(szString, sizeof(szString), "Firma: Post");
    else if(CarInfo[vid][cType]==MULL) format(szString, sizeof(szString), "Firma: Muelldeponie");
    else if(CarInfo[vid][cType]==NEWS) format(szString, sizeof(szString), "Firma: Los Santos Times");
    else if(CarInfo[vid][cType]==BOOT) format(szString, sizeof(szString), "Firma: Los Santos Boote");
    else if(CarInfo[vid][cType]==CREED) format(szString, sizeof(szString), "Firma: Autoverleih");
    else if(CarInfo[vid][cType]==HELISHOP) format(szString, sizeof(szString), "Firma: Heli / Flugzeugshop");
    else if(CarInfo[vid][cType]==BANKER) format(szString, sizeof(szString), "Firma: Bank");
    else if(CarInfo[vid][cType]==RUSSIAN) format(szString, sizeof(szString), "Firma: RUSSIAN");
    else if(CarInfo[vid][cType]==MOPED) format(szString, sizeof(szString), "Firma: Motorradshop");
    else if(CarInfo[vid][cType]==YAKUZA) format(szString, sizeof(szString), "Firma: Yakuza's");
    else if(CarInfo[vid][cType]==TRIAD) format(szString, sizeof(szString), "Firma: Triaden");
    else if(CarInfo[vid][cType]==AUTOLIEFERER)format(szString, sizeof(szString), "Firma: Autolieferung");
    else if(CarInfo[vid][cType]==PARKHAUS) format(szString, sizeof(szString), "Firma: Parkhaus");
    else if(CarInfo[vid][cType]==BIKER) format(szString, sizeof(szString), "Firma: Biker"); // Biker
    else if(CarInfo[vid][cType]==Wasser) format(szString, sizeof(szString), "Firma: Wasser");
    else if(CarInfo[vid][cType]==GROTTI) format(szString, sizeof(szString), "Firma: GrottiCars");
    else if(CarInfo[vid][cType]==shody) format(szString, sizeof(szString), "Firma: ShodysCars");
    else format(szString, sizeof(szString), "Firma: Keine");
    ShowPlayerDialog(playerid, DIALOG_STYLE_MSGBOX, 0, "CarInfo's", szString, "Fertig", "Weiter");
    }
    return 1;
    }


    Hoffe ihr könnt mir helfen :X


    // Frage


    Habe ich vieleicht was vergessen?

    Einmal editiert, zuletzt von Falke1992 ()




  • so sollte es gehen

  • Funktioniert immer noch nicht :( Stützt immer noch ab

  • Das Problem ist ja soweit kommt er ja nicht. Das Programm Stützt soford ab. ( Sieth anhang )

  • Ja habe ich auf die bin ich auch schon gekommen. Dann Funktioniert es alles einwandfrei. Nur sobald ich das so habe macht er das

  • Funktioniert auch nicht. Hättest du vieleich teamviewer?

  • dein else if ist bissel doof würd ich sagen, sowas hab ich noch nie gesehn xD
    Doch eigentlich schon, aber auch bei dem Teil waren Klammern dabei.


    lg


    pS

  • Iron ich seh überhaupt kein sinn in dein code das ist das gleiche wie voher auch.
    bin bis jeds immer noch nicht weiter gekommen


    //edit


    Rechtschriebung verbessert & Text hinzugefügt

    Einmal editiert, zuletzt von Falke1992 ()

  • Public Carinfo(playerid)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    new vid = GetNearestCar(playerid, 3.0);
    if(vid!=INVALID_CAR)
    {
    new szString[32];
    format(szString,sizeof(szString), "Carid: %d",vid);
    format(szString,sizeof(szString), "Besitzer: %s",CarInfo[vid][cOwner]);
    format(szString, sizeof(szString), "Kennzeichen: %s", CarInfo[vid][cKennzeichen]);
    if(CarInfo[vid][cType]==POLIZEI) format(szString, sizeof(szString), "Firma: Polizei");
    else if(CarInfo[vid][cType]==TAXI) format(szString, sizeof(szString), "Firma: Taxi");
    else if(CarInfo[vid][cType]==FAHRSCHULE) format(szString, sizeof(szString), "Firma: Fahrschule");
    else if(CarInfo[vid][cType]==FLUGSCHULE) format(szString, sizeof(szString), "Firma: Flugschule");
    else if(CarInfo[vid][cType]==ADAC) format(szString, sizeof(szString), "Firma: ADAC");
    else if(CarInfo[vid][cType]==OTTO) format(szString, sizeof(szString), "Firma: Otto's Cars");
    else if(CarInfo[vid][cType]==WANG) format(szString, sizeof(szString), "Firma: Wang Cars");
    else if(CarInfo[vid][cType]==FEUER) format(szString, sizeof(szString), "Firma: Feuerwehr");
    else if(CarInfo[vid][cType]==MEDIC) format(szString, sizeof(szString), "Firma: Krankenhaus");
    else if(CarInfo[vid][cType]==TANKER) format(szString, sizeof(szString), "Firma: Oil Company");
    else if(CarInfo[vid][cType]==SPEDITION) format(szString, sizeof(szString), "Firma: Spedition");
    else if(CarInfo[vid][cType]==POST) format(szString, sizeof(szString), "Firma: Post");
    else if(CarInfo[vid][cType]==MULL) format(szString, sizeof(szString), "Firma: Muelldeponie");
    else if(CarInfo[vid][cType]==NEWS) format(szString, sizeof(szString), "Firma: Los Santos Times");
    else if(CarInfo[vid][cType]==BOOT) format(szString, sizeof(szString), "Firma: Los Santos Boote");
    else if(CarInfo[vid][cType]==CREED) format(szString, sizeof(szString), "Firma: Autoverleih");
    else if(CarInfo[vid][cType]==HELISHOP) format(szString, sizeof(szString), "Firma: Heli / Flugzeugshop");
    else if(CarInfo[vid][cType]==BANKER) format(szString, sizeof(szString), "Firma: Bank");
    else if(CarInfo[vid][cType]==RUSSIAN) format(szString, sizeof(szString), "Firma: RUSSIAN Mafia");
    else if(CarInfo[vid][cType]==MOPED) format(szString, sizeof(szString), "Firma: Motorradshop");
    else if(CarInfo[vid][cType]==YAKUZA) format(szString, sizeof(szString), "Firma: Yakuza's");
    else if(CarInfo[vid][cType]==TRIAD) format(szString, sizeof(szString), "Firma: Triaden");
    else if(CarInfo[vid][cType]==AUTOLIEFERER)format(szString, sizeof(szString), "Firma: Autolieferung");
    else if(CarInfo[vid][cType]==PARKHAUS) format(szString, sizeof(szString), "Firma: Parkhaus");
    else if(CarInfo[vid][cType]==BIKER) format(szString, sizeof(szString), "Firma: Biker"); // BIKER
    else if(CarInfo[vid][cType]==Wasser) format(szString, sizeof(szString), "Firma: WasserGrenzSchutz"); // BIKER
    else if(CarInfo[vid][cType]==GROTTI) format(szString, sizeof(szString), "Firma: GrottiCars");
    else if(CarInfo[vid][cType]==shody) format(szString, sizeof(szString), "Firma: ShodysCars");
    else format(szString, sizeof(szString), "Firma: Keine");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Du befindest dich nicht in der Nähe eines Autos.");
    }
    }
    else
    {
    new vid = GetPlayerVehicleID(playerid);
    new szString[32];
    format(szString,sizeof(szString), "Carid: %d",vid);
    format(szString,sizeof(szString), "Besitzer: %s",CarInfo[vid][cOwner]);
    format(szString, sizeof(szString), "Kennzeichen: %s", CarInfo[vid][cKennzeichen]);
    if(CarInfo[vid][cType]==POLIZEI) format(szString, sizeof(szString), "Firma: Polizei");
    else if(CarInfo[vid][cType]==TAXI) format(szString, sizeof(szString), "Firma: Taxi");
    else if(CarInfo[vid][cType]==FAHRSCHULE) format(szString, sizeof(szString), "Firma: Fahrschule");
    else if(CarInfo[vid][cType]==FLUGSCHULE) format(szString, sizeof(szString), "Firma: Flugschule");
    else if(CarInfo[vid][cType]==ADAC) format(szString, sizeof(szString), "Firma: ADAC");
    else if(CarInfo[vid][cType]==OTTO) format(szString, sizeof(szString), "Firma: Otto's Cars");
    else if(CarInfo[vid][cType]==WANG) format(szString, sizeof(szString), "Firma: Wang Cars");
    else if(CarInfo[vid][cType]==FEUER) format(szString, sizeof(szString), "Firma: Feuerwehr");
    else if(CarInfo[vid][cType]==MEDIC) format(szString, sizeof(szString), "Firma: Krankenhaus");
    else if(CarInfo[vid][cType]==TANKER) format(szString, sizeof(szString), "Firma: Oil Company");
    else if(CarInfo[vid][cType]==SPEDITION) format(szString, sizeof(szString), "Firma: Spedition");
    else if(CarInfo[vid][cType]==POST) format(szString, sizeof(szString), "Firma: Post");
    else if(CarInfo[vid][cType]==MULL) format(szString, sizeof(szString), "Firma: Muelldeponie");
    else if(CarInfo[vid][cType]==NEWS) format(szString, sizeof(szString), "Firma: Los Santos Times");
    else if(CarInfo[vid][cType]==BOOT) format(szString, sizeof(szString), "Firma: Los Santos Boote");
    else if(CarInfo[vid][cType]==CREED) format(szString, sizeof(szString), "Firma: Autoverleih");
    else if(CarInfo[vid][cType]==HELISHOP) format(szString, sizeof(szString), "Firma: Heli / Flugzeugshop");
    else if(CarInfo[vid][cType]==BANKER) format(szString, sizeof(szString), "Firma: Bank");
    else if(CarInfo[vid][cType]==RUSSIAN) format(szString, sizeof(szString), "Firma: RUSSIAN");
    else if(CarInfo[vid][cType]==MOPED) format(szString, sizeof(szString), "Firma: Motorradshop");
    else if(CarInfo[vid][cType]==YAKUZA) format(szString, sizeof(szString), "Firma: Yakuza's");
    else if(CarInfo[vid][cType]==TRIAD) format(szString, sizeof(szString), "Firma: Triaden");
    else if(CarInfo[vid][cType]==AUTOLIEFERER)format(szString, sizeof(szString), "Firma: Autolieferung");
    else if(CarInfo[vid][cType]==PARKHAUS) format(szString, sizeof(szString), "Firma: Parkhaus");
    else if(CarInfo[vid][cType]==BIKER) format(szString, sizeof(szString), "Firma: Biker"); // Biker
    else if(CarInfo[vid][cType]==Wasser) format(szString, sizeof(szString), "Firma: Wasser");
    else if(CarInfo[vid][cType]==GROTTI) format(szString, sizeof(szString), "Firma: GrottiCars");
    else if(CarInfo[vid][cType]==shody) format(szString, sizeof(szString), "Firma: ShodysCars");
    else format(szString, sizeof(szString), "Firma: Keine");
    ShowPlayerDialog(playerid, DIALOG_STYLE_MSGBOX, 0, "CarInfo's", szString, "Fertig", "Weiter");
    return 1;
    }
    }
    }
    }


    Versuch halt mal mehre zu machen, Groß und klein schreibung zählt das dazu zu einem Crash?

  • }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Du befindest dich nicht in der Nähe eines Autos.");
    }
    }
    else
    {
    new vid = GetPlayerVehicleID(playerid);
    new szString[32];


    Mach mal die rote klammer weg..


    //E es muss nicht immer am Schluss liegen bei mir war das mal wo ich auch 2 Klammern ohne bewusst hin gestellt habe^^


    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Du befindest dich nicht in der Nähe eines Autos.");
    }
    else
    {
    new vid = GetPlayerVehicleID(playerid);
    new szString[32];

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