´n paar errors :c

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
  • yo, habe gerade "versucht" nen ammu system zu "schreiben" aber bekomme jedoch 3 errors :c
    C:\Users\Nutzer\Desktop\German Trollface Reallife-My-Reallife Script\gamemodes\MRL.pwn(57054) : error 029: invalid expression, assumed zero
    C:\Users\Nutzer\Desktop\German Trollface Reallife-My-Reallife Script\gamemodes\MRL.pwn(57286) : error 029: invalid expression, assumed zero

    die zeilen :


    der 1. error


    if(dialogid==DIALOG_BUYGUN)


    der 2.. error : ShowPlayerDialog(playerid,DIALOG_BUYGUN_AMMO_SD,DIALOG_STYLE_INPUT,"Waffen - Laden",SD,"Auswählen", "Abbrechen");



    MFG_

  • Kannst du ein bisschen mehr vom Code posten? Ich vermute mal der Fehler liegt einige Zeilen dadrüber, weil der aktuelle Code in Ordnung ist :)

    der 1. error ( mit dem dialog darüber )
    if(dialogid==DIALOG_ZOLLCONTROL2)
    {
    new idzoll = strval(inputtext);
    if(idzoll >= 1 && idzoll <= 20)
    {
    if(zollvar[idzoll-1] == 1)
    {
    format(stringx, sizeof(stringx), "%s hat den Zoll %d geöffnet.", MeinName(playerid), idzoll);
    SendRadioMessage(1, TEAM_BLUE_COLOR, stringx);
    SendRadioMessage(2, TEAM_BLUE_COLOR, stringx);
    zollvar[idzoll-1] = 0;
    }
    else {
    format(stringx, sizeof(stringx), "%s hat den Zoll %d geschlossen.", MeinName(playerid), idzoll);
    SendRadioMessage(1, TEAM_BLUE_COLOR, stringx);
    SendRadioMessage(2, TEAM_BLUE_COLOR, stringx);
    zollvar[idzoll-1] = 1;
    }
    }
    else SendClientMessage(playerid, COLOR_WHITE, "Nur von 1-20!");
    }
    if(dialogid==DIALOG_BUYGUN)
    {
    new location = PlayerInfo[playerid][pLocal];
    if(response)
    {
    switch(listitem)
    {
    case 0://Schutzweste
    {
    new price = GunPrice[0][0];
    if(GetPlayerMoney(playerid) < price)return SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    if(!IsACop(playerid))return SendClientMessage(playerid, -1, "{DF0101}FEHLER: {FFFFFF}Leider können nur Staatsfraktionen eine Rüstung besitzen!");
    GivePlayerMoney(playerid,-price);
    SetPlayerArmour(playerid, 100);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 1://Fallschirm
    {
    new price = GunPrice[1][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 46, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 2://Golfschläger
    {
    new price = GunPrice[2][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 2, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 3://Schlagstock
    {
    new price = GunPrice[3][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 3, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 4://Baseballschläger
    {
    new price = GunPrice[4][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 5, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 5://Schaufel
    {
    new price = GunPrice[5][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 6, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 6://PoolCue
    {
    new price = GunPrice[6][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 7, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 7://Schlagring
    {
    new price = GunPrice[7][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 1, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 8://VioletterDildo
    {
    new price = GunPrice[8][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 10, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 9://WeißerDildo
    {
    new price = GunPrice[9][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 13, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 10://LangerweißerDildo
    {
    new price = GunPrice[10][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 12, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 11://WeißerDildo2
    {
    new price = GunPrice[11][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 11, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 12://Blumen
    {
    new price = GunPrice[12][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 14, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 13://Cane
    {
    new price = GunPrice[13][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 15, 1);
    new preis = price/1;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 14://SD-Pistole
    {
    new SD[128];
    format(SD, 128, "Gib an wieviel Munition du\nfür die SD-Pistole Kaufen Möchtest.\n%d pro Kugel",GunPrice[14][0]);
    ShowPlayerDialog(playerid,DIALOG_BUYGUN_AMMO_SD,DIALOG_STYLE_INPUT,"Waffen - Laden",SD,"Auswählen", "Abbrechen");
    }
    case 15://DesertEagle
    {
    if(isPlayerInFrakt(playerid,8))return SendClientMessage(playerid, -1, "{DF0101}FEHLER: {FFFFFF}Hitmans können leider keine Deagle besitzen!");
    new DE[128];
    format(DE, 128, "Gib an wieviel Munition du\nfür die DesertEagle Kaufen Möchtest.\n%d pro Kugel",GunPrice[15][0]);
    ShowPlayerDialog(playerid,DIALOG_BUYGUN_AMMO_DE,DIALOG_STYLE_INPUT,"Waffen - Laden",DE,"Auswählen", "Abbrechen");
    }
    case 16://MP5
    {
    new MP[128];
    format(MP, 128, "Gib an wieviel Munition du\nfür die MP5 Kaufen Möchtest.\n%d pro Kugel",GunPrice[16][0]);
    ShowPlayerDialog(playerid,DIALOG_BUYGUN_AMMO_MP,DIALOG_STYLE_INPUT,"Waffen - Laden",MP,"Auswählen", "Abbrechen");
    }
    case 17://Shotgun
    {
    new SG[128];
    format(SG, 128, "Gib an wieviel Munition du\nfür die Shotgun Kaufen Möchtest.\n%d pro Kugel",GunPrice[17][0]);
    ShowPlayerDialog(playerid,DIALOG_BUYGUN_AMMO_SG,DIALOG_STYLE_INPUT,"Waffen - Laden",SG,"Auswählen", "Abbrechen");
    }
    case 18://AK47
    {
    new AK[128];
    format(AK, 128, "Gib an wieviel Munition du\nfür die AK47 Kaufen Möchtest.\n%d pro Kugel",GunPrice[18][0]);
    ShowPlayerDialog(playerid,DIALOG_BUYGUN_AMMO_AK,DIALOG_STYLE_INPUT,"Waffen - Laden",AK,"Auswählen", "Abbrechen");
    }
    case 19://M4
    {
    new M4[128];
    format(M4, 128, "Gib an wieviel Munition du\nfür die AK47 Kaufen Möchtest.\n%d pro Kugel",GunPrice[19][0]);
    ShowPlayerDialog(playerid,DIALOG_BUYGUN_AMMO_M4,DIALOG_STYLE_INPUT,"Waffen - Laden",M4,"Auswählen", "Abbrechen");
    }
    case 20://Rifle
    {
    new RF[128];
    format(RF, 128, "Gib an wieviel Munition du\nfür die Rifle Kaufen Möchtest.\n%d pro Kugel",GunPrice[20][0]);
    ShowPlayerDialog(playerid,DIALOG_BUYGUN_AMMO_RF,DIALOG_STYLE_INPUT,"Waffen - Laden",RF,"Auswählen", "Abbrechen");
    }
    case 21://Messer
    {
    if(PlayerInfo[playerid][pLevel] >= 20)
    {
    new price = GunPrice[21][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 4, 1);
    new preis = price/10;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    else { SendClientMessage(playerid,COLOR_GREEN,"Du bist nicht Level 20!"); }
    }
    case 22://Sniper
    {
    if(PlayerInfo[playerid][pLevel] >= 25)
    {
    new SN[128];
    format(SN, 128, "Gib an wieviel Munition du\nfür die Sniper Kaufen Möchtest.\n%d pro Kugel",GunPrice[22][0]);
    ShowPlayerDialog(playerid,DIALOG_BUYGUN_AMMO_SN,DIALOG_STYLE_INPUT,"Waffen - Laden",SN,"Auswählen", "Abbrechen");
    }
    else { SendClientMessage(playerid,COLOR_GREEN,"Du bist nicht Level 25!"); }
    }
    case 23://Katana
    {
    new price = GunPrice[23][0];
    if(GetPlayerMoney(playerid) < price)
    {
    SendClientMessage(playerid, COLOR_GREY, "*** Nicht genug Geld! ***");
    return 1;
    }
    GivePlayerMoney(playerid,-price);
    GivePlayerWeapon(playerid, 8, 1);
    new preis = price/10;
    BizzInfo[location-99][bTill] += preis;
    ExtortionBiz(location-99, preis);
    BizzInfo[location-99][bProducts]--;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    }
    case 24://Tränengas
    {
    new TG[128];
    format(TG, 128, "Gib an wieviel Munition du\nfür das Tränengas Kaufen Möchtest.\n%d pro Kugel",GunPrice[24][0]);
    ShowPlayerDialog(playerid,DIALOG_BUYGUN_AMMO_TG,DIALOG_STYLE_INPUT,"Waffen - Laden",TG,"Auswählen", "Abbrechen");
    }
    case 25://Feuerlöscher
    {
    new FL[128];
    format(FL, 128, "Gib an wieviel Munition du\nfür den Feuerlöscher Kaufen Möchtest.\n%d pro Füllung",GunPrice[25][0]);
    ShowPlayerDialog(playerid,DIALOG_BUYGUN_AMMO_FL,DIALOG_STYLE_INPUT,"Waffen - Laden",FL,"Auswählen", "Abbrechen");
    }
    }
    }
    else
    SendClientMessage(playerid,S_COL_GREY,"** Du hast das Menü verlassen.");
    return 1;
    }


    der 2.
    case 14://SD-Pistole
    {
    new SD[128];
    format(SD, 128, "Gib an wieviel Munition du\nfür die SD-Pistole Kaufen Möchtest.\n%d pro Kugel",GunPrice[14][0]);
    ShowPlayerDialog(playerid,DIALOG_BUYGUN_AMMO_SD,DIALOG_STYLE_INPUT,"Waffen - Laden",SD,"Auswählen", "Abbrechen");
    }

  • Wie hast du den die Dialoge definiert =?
    Poste das auch mal bitte

    habs jetz habe aber jetz ´n paar andere errors :c


    C:\Users\Nutzer\Desktop\German Trollface Reallife-My-Reallife Script\gamemodes\MRL.pwn(65110) : error 017: undefined symbol "foreach"C:\Users\Nutzer\Desktop\German Trollface Reallife-My-Reallife Script\gamemodes\MRL.pwn(65112): error 017: undefined symbol "playerid"C:\Users\Nutzer\Desktop\German Trollface Reallife-My-Reallife Script\gamemodes\MRL.pwn(65115) : error 017: undefined symbol "playerid"C:\Users\Nutzer\Desktop\German Trollface Reallife-My-Reallife Script\gamemodes\MRL.pwn(66473) : error 017: undefined symbol "PlayerName"C:\Users\Nutzer\Desktop\German Trollface Reallife-My-Reallife Script\gamemodes\MRL.pwn(66473) : warning 215: expression has no effectC:\Users\Nutzer\Desktop\German Trollface Reallife-My-Reallife Script\gamemodes\MRL.pwn(66473) : error 001: expected token: ";", but found "]"C:\Users\Nutzer\Desktop\German Trollface Reallife-My-Reallife Script\gamemodes\MRL.pwn(66473) : error 029: invalid expression, assumed zero


    ZEILE 65110 :


    foreach (Player, playerid)


    ZEILE 65112 :


    GetPlayerName(playerid, name, sizeof (name));


    ZEILE 65115:


    setarg(paramPos, 0, playerid);




    diese errors sind gekommen seitdem ich das "system" drinne habe, könnte mir jmd evtl über tv helfen ? :c