/ahelp Errors

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
  • Nabend Breadfishler,


    Ich habe eine Frage und 1 Problem :D


    Also meine Frage:"Ist die Adminbefehle "Einteilung" okay?"


    Und mein Problem bzw meine Errors sind diese:
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2577) : error 029: invalid expression, assumed zero
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2577) : warning 215: expression has no effect
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2577) : error 001: expected token: ";", but found ")"
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2577) : error 029: invalid expression, assumed zero
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2577) : fatal error 107: too many error messages on one line



    mein /ahelp befehl:


    if (strcmp("/ahelp", cmdtext, true, 10) == 0)
    {
    if(!IstSpielerAdmin(playerid, <1330)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!"); //2577
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,ROT,"*1330*: /teamstatus /ac [Text] (Adminchat)/kick /ban /goto /gethere /warn [ID]");
    SendClientMessage(playerid,ROT,"*1330*: /cleartext [falls IP Post im OOC]*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,<1331)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,GRAU,"*1331*: /ac /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]);
    SendClientMessage(playerid,GRAU,"*1331*: /cleartext[falls IP Post im OOC] /prison [ID] [Nur SDM Fälle!]*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,<1332)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,PINK,"*1332*: /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]");
    SendClientMessage(playerid,PINK,"*1332*: /cleartext[falls IP Post im OOC] /prison [ID] [Nur SDM Fälle!]");
    SendClientMessage(playerid,PINK,"*1332*: /freeze /unfreeze /supcar*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,<1333)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,GOLD,"*1333*: /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]");
    SendClientMessage(playerid,GOLD,"*1333*: /countdown /cleartext /prison");
    SendClientMessage(playerid,GOLD,"*1333*: /freeze /unfreeze /supcar*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,<1334)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,LILA,"*1334*: /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]")
    SendClientMessage(playerid,LILA,"*1334*: /countdown /cleartext /prison /gotols /gotolv /gotosf /gotobsn");
    SendClientMessage(playerid,LILA,"*1334*: /freeze /unfreeze /supcar*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,<1335)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,HELLROT,"*1335*: /supcar /kick /ban /goto [ID] /gethere /warn [ID] [Grund]");
    SendClientMessage(playerid,HELLROT,"*1335*: /countdown /cleartext /tv [ID] /prison /gotols /gotolv /gotosf /gotobsn");
    SendClientMessage(playerid,HELLROT,"*1335*: /freeze /unfreeze /supcar /aungangjail*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,<1336)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,ORANGE,"*1336*: /supcar /kick /ban /goto [ID] /gethere /warn [ID] [Grund]");
    SendClientMessage(playerid,ORANGE,"*1336*: /countdown /cleartext /tv [ID] /prison /gotols /gotolv /gotosf /gotobsn");
    SendClientMessage(playerid,ORANGE,"*1336*: /freeze /unfreeze /supcar /aungangjail*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,<1337)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,HELLBLAU,"*1337*: /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]");
    SendClientMessage(playerid,HELLBLAU,"*1337*: /countdown /cleartext /tv /prison /gotols /gotolv /gotosf /gotobsn*");
    SendClientMessage(playerid,HELLBLAU,"*1337*: /freeze /unfreeze /supcar /aungangjail*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,<2000)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,BLAU,"*2000*: /supcar /kick /ban /goto /gethere /warn /countdown");
    SendClientMessage(playerid,BLAU,"*2000*: /clearchat /tv /makeleader /setfraktion /makeadmin");
    SendClientMessage(playerid,BLAU,"*2000*: /makesup /setfkasse /aungangjail /prison /ac");
    SendClientMessage(playerid,BLAU,"*2000*: /startevent /stopevent /startlotto");
    SendClientMessage(playerid,BLAU,"*2000*: /gotols /gotosf /gotolv /gotobsn /gotoalca*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,<2001)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,GREEN,"*2001*: /supcar /kick /ban /goto /gethere /warn /countdown");
    SendClientMessage(playerid,GREEN,"*2001*: /clearchat /tv /makeleader /setfraktion /makeadmin");
    SendClientMessage(playerid,GREEN,"*2001*: /makesup /setfkasse /aungangjail /prison /ac");
    SendClientMessage(playerid,GREEN,"*2001*: /startevent /stopevent /startlotto");
    SendClientMessage(playerid,GREEN,"*2001*: /gotols /gotosf /gotolv /gotobsn /gotoalca /gmx*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    }

  • @Kaliber
    Nun habe ich das:
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2575) : warning 217: loose indentation
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2585) : warning 225: unreachable code
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2593) : warning 225: unreachable code
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2602) : warning 225: unreachable code
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2611) : warning 225: unreachable code
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2615) : error 001: expected token: ";", but found "-identifier-"
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2620) : warning 225: unreachable code
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2629) : warning 225: unreachable code
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2638) : warning 225: unreachable code
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2647) : warning 225: unreachable code
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2658) : warning 225: unreachable code
    C:\Users\User\Desktop\SERVER\gamemodes\NGR.pwn(2670) : warning 217: loose indentation
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    Und der Befehl sieht nun so aus:
    if (strcmp("/ahelp", cmdtext, true, 10) == 0)
    {
    if(!IstSpielerAdmin(playerid, 1330)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!"); //2577
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,ROT,"*1330*: /teamstatus /ac [Text] (Adminchat)/kick /ban /goto /gethere /warn [ID]");
    SendClientMessage(playerid,ROT,"*1330*: /cleartext [falls IP Post im OOC]*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,1331)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,GRAU,"*1331*: /ac /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]");
    SendClientMessage(playerid,GRAU,"*1331*: /cleartext[falls IP Post im OOC] /prison [ID] [Nur SDM Fälle!]*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,1332)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,PINK,"*1332*: /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]");
    SendClientMessage(playerid,PINK,"*1332*: /cleartext[falls IP Post im OOC] /prison [ID] [Nur SDM Fälle!]");
    SendClientMessage(playerid,PINK,"*1332*: /freeze /unfreeze /supcar*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,1333)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,GOLD,"*1333*: /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]");
    SendClientMessage(playerid,GOLD,"*1333*: /countdown /cleartext /prison");
    SendClientMessage(playerid,GOLD,"*1333*: /freeze /unfreeze /supcar*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,1334)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,LILA,"*1334*: /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]")
    SendClientMessage(playerid,LILA,"*1334*: /countdown /cleartext /prison /gotols /gotolv /gotosf /gotobsn");
    SendClientMessage(playerid,LILA,"*1334*: /freeze /unfreeze /supcar*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,1335)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,HELLROT,"*1335*: /supcar /kick /ban /goto [ID] /gethere /warn [ID] [Grund]");
    SendClientMessage(playerid,HELLROT,"*1335*: /countdown /cleartext /tv [ID] /prison /gotols /gotolv /gotosf /gotobsn");
    SendClientMessage(playerid,HELLROT,"*1335*: /freeze /unfreeze /supcar /aungangjail*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,1336)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,ORANGE,"*1336*: /supcar /kick /ban /goto [ID] /gethere /warn [ID] [Grund]");
    SendClientMessage(playerid,ORANGE,"*1336*: /countdown /cleartext /tv [ID] /prison /gotols /gotolv /gotosf /gotobsn");
    SendClientMessage(playerid,ORANGE,"*1336*: /freeze /unfreeze /supcar /aungangjail*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,1337)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,HELLBLAU,"*1337*: /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]");
    SendClientMessage(playerid,HELLBLAU,"*1337*: /countdown /cleartext /tv /prison /gotols /gotolv /gotosf /gotobsn*");
    SendClientMessage(playerid,HELLBLAU,"*1337*: /freeze /unfreeze /supcar /aungangjail*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,2000)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,BLAU,"*2000*: /supcar /kick /ban /goto /gethere /warn /countdown");
    SendClientMessage(playerid,BLAU,"*2000*: /clearchat /tv /makeleader /setfraktion /makeadmin");
    SendClientMessage(playerid,BLAU,"*2000*: /makesup /setfkasse /aungangjail /prison /ac");
    SendClientMessage(playerid,BLAU,"*2000*: /startevent /stopevent /startlotto");
    SendClientMessage(playerid,BLAU,"*2000*: /gotols /gotosf /gotolv /gotobsn /gotoalca*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    if(!IstSpielerAdmin(playerid,2001)) return SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,GREEN,"*2001*: /supcar /kick /ban /goto /gethere /warn /countdown");
    SendClientMessage(playerid,GREEN,"*2001*: /clearchat /tv /makeleader /setfraktion /makeadmin");
    SendClientMessage(playerid,GREEN,"*2001*: /makesup /setfkasse /aungangjail /prison /ac");
    SendClientMessage(playerid,GREEN,"*2001*: /startevent /stopevent /startlotto");
    SendClientMessage(playerid,GREEN,"*2001*: /gotols /gotosf /gotolv /gotobsn /gotoalca /gmx*");
    SendClientMessage(playerid,GELB,"============================================================================");
    return 1;
    }
    }

    • Offizieller Beitrag

    Du hast irgendwie nur eine Bedingung, wenn diese nicht erfüllt ist returnt der compiler und führt den restlichen Code nicht aus.
    Entferne bei den IstSpielerAdmin Zeilen das ! und alles hinter den Klammern

  • Habe es nun Hinbekommen dank @Whice. und @Keslo


    Und nun wird mir nur die Hilfe von 1330 angezeigt und nicht von 2001 trotz Adminlvl 2001 hier der Befehl:


    if (strcmp("/ahelp", cmdtext, true, 10) == 0)
    {
    if(IstSpielerAdmin(playerid, 1330))
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,ROT,"*1330*: /teamstatus /ac [Text] (Adminchat)/kick /ban /goto /gethere /warn [ID]");
    SendClientMessage(playerid,ROT,"*1330*: /cleartext [falls IP Post im OOC]*");
    SendClientMessage(playerid,GELB,"============================================================================");
    }
    else if(IstSpielerAdmin(playerid,1331))
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,GRAU,"*1331*: /ac /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]");
    SendClientMessage(playerid,GRAU,"*1331*: /cleartext[falls IP Post im OOC] /prison [ID] [Nur SDM Fälle!]*");
    SendClientMessage(playerid,GELB,"============================================================================");
    }
    else if(IstSpielerAdmin(playerid,1332))
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,PINK,"*1332*: /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]");
    SendClientMessage(playerid,PINK,"*1332*: /cleartext[falls IP Post im OOC] /prison [ID] [Nur SDM Fälle!]");
    SendClientMessage(playerid,PINK,"*1332*: /freeze /unfreeze /supcar*");
    SendClientMessage(playerid,GELB,"============================================================================");
    }
    else if(IstSpielerAdmin(playerid,1333))
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,GOLD,"*1333*: /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]");
    SendClientMessage(playerid,GOLD,"*1333*: /countdown /cleartext /prison");
    SendClientMessage(playerid,GOLD,"*1333*: /freeze /unfreeze /supcar*");
    SendClientMessage(playerid,GELB,"============================================================================");
    }
    else if(IstSpielerAdmin(playerid,1334))
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,LILA,"*1334*: /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]");
    SendClientMessage(playerid,LILA,"*1334*: /countdown /cleartext /prison /gotols /gotolv /gotosf /gotobsn");
    SendClientMessage(playerid,LILA,"*1334*: /freeze /unfreeze /supcar*");
    SendClientMessage(playerid,GELB,"============================================================================");
    }
    else if(IstSpielerAdmin(playerid,1335))
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,HELLROT,"*1335*: /supcar /kick /ban /goto [ID] /gethere /warn [ID] [Grund]");
    SendClientMessage(playerid,HELLROT,"*1335*: /countdown /cleartext /tv [ID] /prison /gotols /gotolv /gotosf /gotobsn");
    SendClientMessage(playerid,HELLROT,"*1335*: /freeze /unfreeze /supcar /aungangjail*");
    SendClientMessage(playerid,GELB,"============================================================================");
    }
    else if(IstSpielerAdmin(playerid,1336))
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,ORANGE,"*1336*: /supcar /kick /ban /goto [ID] /gethere /warn [ID] [Grund]");
    SendClientMessage(playerid,ORANGE,"*1336*: /countdown /cleartext /tv [ID] /prison /gotols /gotolv /gotosf /gotobsn");
    SendClientMessage(playerid,ORANGE,"*1336*: /freeze /unfreeze /supcar /aungangjail*");
    SendClientMessage(playerid,GELB,"============================================================================");
    }
    else if(IstSpielerAdmin(playerid,1337))
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,HELLBLAU,"*1337*: /supcar /kick /ban /goto [ID] /gethere [ID] /warn [ID]");
    SendClientMessage(playerid,HELLBLAU,"*1337*: /countdown /cleartext /tv /prison /gotols /gotolv /gotosf /gotobsn*");
    SendClientMessage(playerid,HELLBLAU,"*1337*: /freeze /unfreeze /supcar /aungangjail*");
    SendClientMessage(playerid,GELB,"============================================================================");
    }
    else if(IstSpielerAdmin(playerid,2000))
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,BLAU,"*2000*: /supcar /kick /ban /goto /gethere /warn /countdown");
    SendClientMessage(playerid,BLAU,"*2000*: /clearchat /tv /makeleader /setfraktion /makeadmin");
    SendClientMessage(playerid,BLAU,"*2000*: /makesup /setfkasse /aungangjail /prison /ac");
    SendClientMessage(playerid,BLAU,"*2000*: /startevent /stopevent /startlotto");
    SendClientMessage(playerid,BLAU,"*2000*: /gotols /gotosf /gotolv /gotobsn /gotoalca*");
    SendClientMessage(playerid,GELB,"============================================================================");
    }
    else if(IstSpielerAdmin(playerid,2001))
    {
    SendClientMessage(playerid,GELB,"============================================================================");
    SendClientMessage(playerid,GREEN,"*2001*: /supcar /kick /ban /goto /gethere /warn /countdown");
    SendClientMessage(playerid,GREEN,"*2001*: /clearchat /tv /makeleader /setfraktion /makeadmin");
    SendClientMessage(playerid,GREEN,"*2001*: /makesup /setfkasse /aungangjail /prison /ac");
    SendClientMessage(playerid,GREEN,"*2001*: /startevent /stopevent /startlotto");
    SendClientMessage(playerid,GREEN,"*2001*: /gotols /gotosf /gotolv /gotobsn /gotoalca /gmx*");
    SendClientMessage(playerid,GELB,"============================================================================");
    }
    else
    {
    SendClientMessage(playerid,ROT,"Du bist kein Administrator!");
    return 1;
    }
    return 1;
    }