11 Errors /gangequip

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
  • Hallo liebe Scripter und Breadfisher.
    Ich bin gerade dabei ein /equip befehl für Gangs zuscripten, bin auch schon damit Fertig.
    Aber ich bekomme 11 Errors, weiß vlt jemand was da Falsch ist ?


    if(strcmp(cmd, "/gangequip", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsPlayerInRangeOfPoint(playerid,5.0,1233.1462,-981.1647,43.4766) || IsPlayerInRangeOfPoint(playerid,5.0,145.6218,1367.0225,1083.8594)|| IsPlayerInRangeOfPoint(playerid,5.0,236.5579,1064.8623,1084.2083) || IsPlayerInRangeOfPoint(playerid,5.0,145.5831,1366.8931,1083.8594) || IsPlayerInRangeOfPoint(playerid,5.0,-222.6197,1400.7908,27.7656)) || IsPlayerInRangeOfPoint(playerid,5.0,503.2602,-75.1576,998.7651)) || IsPlayerInRangeOfPoint(playerid,5.0,2491.7283,-1690.8501,14.7656)) || IsPlayerInRangeOfPoint(playerid,5.0,2819.0388,-1169.9384,1025.5703)) || IsPlayerInRangeOfPoint(playerid,5.0,1211.8036,-15.4760,1000.9219)) || IsPlayerInRangeOfPoint(playerid,5.0,745.0085,1439.7786,1102.7031)) || IsPlayerInRangeOfPoint(playerid,5.0,327.8148,1482.8434,1084.4375)) || IsPlayerInRangeOfPoint(playerid,5.0,259.5170,1243.1080,1084.2578)) || IsPlayerInRangeOfPoint(playerid,5.0,2267.2373,-79.2482,26.7834)) || IsPlayerInRangeOfPoint(playerid,5.0,27.3693,1343.2300,1084.3750)) || IsPlayerInRangeOfPoint(playerid,5.0,963.6270,2112.4751,1011.0234))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_RED, "WARNUNG : Wenn du kein Waffenschein hast, wirst du von Kent_Brockman gekickt!");
    SendClientMessage(playerid, COLOR_WHITE, "Hilfe : /gangequip [item nummer]");
    SendClientMessage(playerid, COLOR_GREEN, "|_______ Ausrüstung _______|");
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "| 1: Alle Waffen weglegen2: MP5+Deagle");
    return 1;
    }
    new item = strval(tmp);
    if (item == 1)
    {
    if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pMember] == 15 ||PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pMember] == 18||PlayerInfo[playerid][pLeader] == 18 ||PlayerInfo[playerid][pMember] == 19||PlayerInfo[playerid][pLeader] == 19 || PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pLeader] == 20 || PlayerInfo[playerid][pLeader] == 22 || PlayerInfo[playerid][pMember] == 22 || PlayerInfo[playerid][pMember] == 23 || PlayerInfo[playerid][pLeader] == 23 ||PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pMember] == 10)
    if(PlayerInfo[playerid][pLeader] == 12 ||PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 13)
    {
    ResetPlayerWeapons(playerid);
    }
    }
    else if (item == 2)
    {
    if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pMember] == 15 ||PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pMember] == 18||PlayerInfo[playerid][pLeader] == 18 ||PlayerInfo[playerid][pMember] == 19||PlayerInfo[playerid][pLeader] == 19 || PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pLeader] == 20 || PlayerInfo[playerid][pLeader] == 22 || PlayerInfo[playerid][pMember] == 22 || PlayerInfo[playerid][pMember] == 23 || PlayerInfo[playerid][pLeader] == 23 ||PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pMember] == 10)
    if(PlayerInfo[playerid][pLeader] == 12 ||PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 13)
    {
    GivePlayerWeapon(playerid, 24, 500);
    GivePlayerWeapon(playerid, 29, 500);
    return 1;
    }
    return 1;
    }
    }
    return 1;
    }
    }


    Errors :


    C:\Users\cRcKdwN\Desktop\reallife county srv\gamemodes\rockstar.pwn(961) : error 020: invalid symbol name ""
    C:\Users\cRcKdwN\Desktop\reallife county srv\gamemodes\rockstar.pwn(961) : error 010: invalid function or declaration
    C:\Users\cRcKdwN\Desktop\reallife county srv\gamemodes\rockstar.pwn(13891) : error 017: undefined symbol "waffenwheelman"
    C:\Users\cRcKdwN\Desktop\reallife county srv\gamemodes\rockstar.pwn(15144) : error 017: undefined symbol "FSLift1"
    C:\Users\cRcKdwN\Desktop\reallife county srv\gamemodes\rockstar.pwn(17210) : error 017: undefined symbol "FSLift1"
    C:\Users\cRcKdwN\Desktop\reallife county srv\gamemodes\rockstar.pwn(17217) : error 017: undefined symbol "FSLift1"
    C:\Users\cRcKdwN\Desktop\reallife county srv\gamemodes\rockstar.pwn(24258) : error 075: input line too long (after substitutions)
    C:\Users\cRcKdwN\Desktop\reallife county srv\gamemodes\rockstar.pwn(24259) : error 029: invalid expression, assumed zero
    C:\Users\cRcKdwN\Desktop\reallife county srv\gamemodes\rockstar.pwn(24259) : error 001: expected token: ";", but found ")"
    C:\Users\cRcKdwN\Desktop\reallife county srv\gamemodes\rockstar.pwn(24259) : error 029: invalid expression, assumed zero
    C:\Users\cRcKdwN\Desktop\reallife county srv\gamemodes\rockstar.pwn(24259) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    11 Errors.


    Need HELP :D ;(
    Hat keiner eine Idee ?


    //Edit : Text

    Einmal editiert, zuletzt von cRcKdwN ()

  • Mobb mich nicht ^^
    Aber ich find es muss nur an den Befehl liegen, der unten angezeigt wird.
    ich glaube durch eine Klammer oder Return wurde alles Verschoben und er gibt mir dadurch lauter Errors ^^

  • Zeile 961 :


    new FSLift1;


    Zeile 13891 :


    waffenwheelman = CreatePickup(1318, 23, 963.6270,2112.4751,1011.0234);


    Zeile 15144 :


    FSLift1 = CreateDynamicObject(3115, -1414.470703125, 512.255859375, 9.8249855041504, 0, 0, 270); //unten


    Zeile 17210 :


    MoveDynamicObject(FSLift1,-1414.470703125, 512.255859375, 9.8249855041504,4.0);


    Zeile 17217 :


    MoveDynamicObject(FSLift1,-1414.470703125, 512.255859375, 16.924877166748,4.0);


    Zeile 24258 :


    if(strcmp(cmd, "/gangequip", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    { // DAS HIER IST DER ERROR MIT DER ZEILE


    ( in der Zeile 3 Errors ) Zeile 24259 :


    if(IsPlayerInRangeOfPoint(playerid,5.0,1233.1462,-981.1647,43.4766) || IsPlayerInRangeOfPoint(playerid,5.0,145.6218,1367.0225,1083.8594)|| IsPlayerInRangeOfPoint(playerid,5.0,236.5579,1064.8623,1084.2083) || IsPlayerInRangeOfPoint(playerid,5.0,145.5831,1366.8931,1083.8594) || IsPlayerInRangeOfPoint(playerid,5.0,-222.6197,1400.7908,27.7656)) || IsPlayerInRangeOfPoint(playerid,5.0,503.2602,-75.1576,998.7651)) || IsPlayerInRangeOfPoint(playerid,5.0,2491.7283,-1690.8501,14.7656)) || IsPlayerInRangeOfPoint(playerid,5.0,2819.0388,-1169.9384,1025.5703)) || IsPlayerInRangeOfPoint(playerid,5.0,1211.8036,-15.4760,1000.9219)) || IsPlayerInRangeOfPoint(playerid,5.0,745.0085,1439.7786,1102.7031)) || IsPlayerInRangeOfPoint(playerid,5.0,327.8148,1482.8434,1084.4375)) || IsPlayerInRangeOfPoint(playerid,5.0,259.5170,1243.1080,1084.2578)) || IsPlayerInRangeOfPoint(playerid,5.0,2267.2373,-79.2482,26.7834)) || IsPlayerInRangeOfPoint(playerid,5.0,27.3693,1343.2300,1084.3750)) || IsPlayerInRangeOfPoint(playerid,5.0,963.6270,2112.4751,1011.0234))


    Zeile

  • Wenn so ein Error kommt, mit "Input line too long(...)" dann musst du die Zeile 'aufteilen'.
    Du kannst jede Zeile in z.B. 2 Zeilen trennen, du musst aber darauf auchten das du es nach einem Komma ( , ) machst.


    Quasi so:


    if(IsPlayerInRangeOfPoint(playerid,5.0,1233.1462,-981.1647,43.4766) || IsPlayerInRangeOfPoint(playerid,5.0,145.6218,1367.0225,1083.8594)|| IsPlayerInRangeOfPoint(playerid,5.0,236.5579,1064.8623,1084.2083) || IsPlayerInRangeOfPoint(playerid,5.0,145.5831,1366.8931,1083.8594) || IsPlayerInRangeOfPoint(playerid,5.0,
    -222.6197,1400.7908,27.7656)) || IsPlayerInRangeOfPoint(playerid,5.0,503.2602,-75.1576,998.7651)) || IsPlayerInRangeOfPoint(playerid,5.0,2491.7283,-1690.8501,14.7656)) || IsPlayerInRangeOfPoint(playerid,5.0,2819.0388,-1169.9384,1025.5703)) || IsPlayerInRangeOfPoint(playerid,5.0,1211.8036,-15.4760,1000.9219)) || IsPlayerInRangeOfPoint(playerid,5.0,745.0085,1439.7786,1102.7031)) || IsPlayerInRangeOfPoint(playerid,5.0,327.8148,1482.8434,
    1084.4375)) || IsPlayerInRangeOfPoint(playerid,5.0,259.5170,1243.1080,1084.2578)) || IsPlayerInRangeOfPoint(playerid,5.0,2267.2373,-79.2482,26.7834)) || IsPlayerInRangeOfPoint(playerid,5.0,27.3693,1343.2300,1084.3750)) || IsPlayerInRangeOfPoint(playerid,5.0,963.6270,2112.4751,1011.0234))

  • Versuch es mal so:


    if(strcmp(cmd, "/Gangequip", true) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid,5.0,2819.0388,-1169.9384,1025.5703) || IsPlayerInRangeOfPoint(playerid,5.0,1211.8036,-15.4760,1000.9219) || IsPlayerInRangeOfPoint(playerid,5.0,745.0085,1439.7786,1102.7031) || IsPlayerInRangeOfPoint(playerid,5.0,327.8148,1482.8434,1084.4375) || IsPlayerInRangeOfPoint(playerid,5.0,259.5170,1243.1080,1084.2578) || IsPlayerInRangeOfPoint(playerid,5.0,2267.2373,-79.2482,26.7834) || IsPlayerInRangeOfPoint(playerid,5.0,27.3693,1343.2300,1084.3750))
    if (IsPlayerInRangeOfPoint(playerid,5.0,1233.1462,-981.1647,43.4766) || IsPlayerInRangeOfPoint(playerid,5.0,145.6218,1367.0225,1083.8594) || IsPlayerInRangeOfPoint(playerid,5.0,236.5579,1064.8623,1084.2083) || IsPlayerInRangeOfPoint(playerid,5.0,145.5831,1366.8931,1083.8594) || IsPlayerInRangeOfPoint(playerid,5.0,-222.6197,1400.7908,27.7656) || IsPlayerInRangeOfPoint(playerid,5.0,503.2602,-75.1576,998.7651) || IsPlayerInRangeOfPoint(playerid,5.0,2491.7283,-1690.8501,14.7656))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_RED, "WARNUNG : Wenn du kein Waffenschein hast, wirst du von Kent_Brockman gekickt!");
    SendClientMessage(playerid, COLOR_WHITE, "Hilfe : /gangequip [item nummer]");
    SendClientMessage(playerid, COLOR_GREEN, "|_______ Ausrüstung _______|");
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "| 1: Alle Waffen weglegen 2: MP5+Deagle");
    return 1;
    }
    if(strcmp(tmp,"1",true) == 0)
    {
    if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pMember] == 10)
    if(PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18 || PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pLeader] == 19 || PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pLeader] == 20 || PlayerInfo[playerid][pLeader] == 22 || PlayerInfo[playerid][pMember] == 22 || PlayerInfo[playerid][pMember] == 23 || PlayerInfo[playerid][pLeader] == 23)
    if(PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
    {
    ResetPlayerWeapons(playerid);
    return 1;
    }
    }
    else if(strcmp(tmp,"2",true) == 0)
    {
    if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pMember] == 10)
    if(PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18 || PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pLeader] == 19 || PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pLeader] == 20 || PlayerInfo[playerid][pLeader] == 22 || PlayerInfo[playerid][pMember] == 22 || PlayerInfo[playerid][pMember] == 23 || PlayerInfo[playerid][pLeader] == 23)
    if(PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
    {
    GivePlayerWeapon(playerid, 24, 500);
    GivePlayerWeapon(playerid, 29, 500);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, "WARNUNG : Wenn du kein Waffenschein hast, wirst du von Kent_Brockman gekickt!");
    SendClientMessage(playerid, COLOR_WHITE, "Hilfe : /gangequip [item nummer]");
    SendClientMessage(playerid, COLOR_GREEN, "|_______ Ausrüstung _______|");
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "| 1: Alle Waffen weglegen 2: MP5+Deagle");
    return 1;
    }
    }
    }

  • Du kannst jede Zeile in z.B. 2 Zeilen trennen, du musst aber darauf auchten das du es nach einem Komma ( , ) machst.

    Blödsinn :huh: Man kann so wie ich unten nach Verknüpfungen trennen, aber nicht nach Kommas das is Quatsch

    Versuch es mal so:


    Wozu so viele if-Abfragen? Wird so wohl kaum funktionieren...


    Wenn dann so: //Edit eingerückt

    //
    if(strcmp(cmd, "/gangequip", true) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid,5.0,1233.1462,-981.1647,43.4766) || IsPlayerInRangeOfPoint(playerid,5.0,145.6218,1367.0225,1083.8594)
    || IsPlayerInRangeOfPoint(playerid,5.0,236.5579,1064.8623,1084.2083) || IsPlayerInRangeOfPoint(playerid,5.0,145.5831,1366.8931,1083.8594)
    || IsPlayerInRangeOfPoint(playerid,5.0,-222.6197,1400.7908,27.7656) || IsPlayerInRangeOfPoint(playerid,5.0,503.2602,-75.1576,998.7651)
    || IsPlayerInRangeOfPoint(playerid,5.0,2491.7283,-1690.8501,14.7656) || IsPlayerInRangeOfPoint(playerid,5.0,2819.0388,-1169.9384,1025.5703)
    || IsPlayerInRangeOfPoint(playerid,5.0,1211.8036,-15.4760,1000.9219) || IsPlayerInRangeOfPoint(playerid,5.0,745.0085,1439.7786,1102.7031)
    || IsPlayerInRangeOfPoint(playerid,5.0,327.8148,1482.8434,1084.4375) || IsPlayerInRangeOfPoint(playerid,5.0,259.5170,1243.1080,1084.2578)
    || IsPlayerInRangeOfPoint(playerid,5.0,2267.2373,-79.2482,26.7834) || IsPlayerInRangeOfPoint(playerid,5.0,27.3693,1343.2300,1084.3750)
    || IsPlayerInRangeOfPoint(playerid,5.0,963.6270,2112.4751,1011.0234))
    {
    new Mitglied;
    if(PlayerInfo[playerid][pMember] > PlayerInfo[playerid][pLeader]) Mitglied = PlayerInfo[playerid][pMember];
    else Mitglied = PlayerInfo[playerid][pLeader]; //Erklärung siehe unten


    if(Mitglied == 14 || Mitglied == 15 || Mitglied == 16 || Mitglied == 17 || Mitglied == 18
    || Mitglied == 19 || Mitglied == 20 || Mitglied == 22 || Mitglied == 23 || Mitglied == 5
    || Mitglied == 6 || Mitglied == 8 || Mitglied == 10 || Mitglied == 12 || Mitglied == 13)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_RED, "WARNUNG : Wenn du kein Waffenschein hast, wirst du von Kent_Brockman gekickt!");
    SendClientMessage(playerid, COLOR_WHITE, "Hilfe : /gangequip [item nummer]");
    SendClientMessage(playerid, COLOR_GREEN, "|_______ Ausrüstung _______|");
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "| 1: Alle Waffen weglegen2: MP5+Deagle");
    return 1;
    }
    new item = strval(tmp);
    if (item == 1)
    {
    ResetPlayerWeapons(playerid);
    }
    else if (item == 2)
    {
    GivePlayerWeapon(playerid, 24, 500);
    GivePlayerWeapon(playerid, 29, 500);
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, "Du bist kein Mitglied!");
    }
    }
    return 1;
    }