Klammerfehler

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 :D


    Ich habe 1 Klammerfehler ^^


    Error:

    C:\Users\Mehmet Ali\Desktop\GTA San Andreas\[GeS]Script\gamemodes\[GeS].pwn(23137) : error 001: expected token: ")", but found "{"C:\Users\AYDIN ALANYALI\Desktop\GTA San Andreas\[GeS]Script\gamemodes\[GeS].pwn(23137) : error 001: expected token: ")", but found "{"

    Zeile:

    if(strcmp(cmd, "/duty", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(IsACop(playerid))
    {
    if (IsPlayerInRangeOfPoint(playerid,3.0,227.6519,111.8072,1003.2188) ||IsPlayerInRangeOfPoint(playerid,3.0,255.3,77.4,1003.6)
    || IsPlayerInRangeOfPoint(playerid,3.0,-1616.1294,681.1594,7.1875) || IsPlayerInRangeOfPoint(playerid,3.0, 217.5230,184.4352,1003.0313)
    || IsPlayerInRangeOfPoint(playerid,3.0, 217.8921,78.9727,1005.0391 || IsPlayerInRangeOfPoint(playerid,3.0,-1341.8116,496.1546,11.1953)
    || PlayerInfo[playerid][pLocal] != 255)
    { //HIER
    if(OnDuty[playerid]==0)
    {
    format(string, sizeof(string), "* Officer %s nimmt seine Marke aus dem Schrank und meldet sich zum Dienst.", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    GivePlayerWeapon(playerid, 41, 500); //spray
    GivePlayerWeapon(playerid, 3, 1); //Nightstick
    GivePlayerWeapon(playerid, 25, 100); //Shotgun
    GivePlayerWeapon(playerid, 24, 500); //Desert Eagle
    GivePlayerWeapon(playerid, 31, 500); //M4
    OnDuty[playerid] = 1;
    }
    else if(OnDuty[playerid]==1)
    {
    format(string, sizeof(string), "* Officer %s legt seine Marke in den Schrank und macht Feierabend.", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    ResetPlayerWeapons(giveplayerid);
    PlayerInfo[giveplayerid][pGun1] = 0; PlayerInfo[giveplayerid][pAmmo1] = 0;
    PlayerInfo[giveplayerid][pGun2] = 0; PlayerInfo[giveplayerid][pAmmo2] = 0;
    PlayerInfo[giveplayerid][pGun3] = 0; PlayerInfo[giveplayerid][pAmmo3] = 0;
    PlayerInfo[giveplayerid][pGun4] = 0; PlayerInfo[giveplayerid][pAmmo4] = 0;
    OnDuty[playerid] = 0;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist in keiner Umkleide !");
    return 1;
    }
    }
    else if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
    {
    if(JobDuty[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Du bist nun ausser Dienst und empfängst keine Notrufe mehr.");
    JobDuty[playerid] = 0;
    Medics -= 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Du bist nun im Dienst und wirst Notrufe empfangen.");
    JobDuty[playerid] = 1;
    Medics += 1;
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 24 || PlayerInfo[playerid][pMember] == 24)
    {
    if(JobDuty[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Du bist nun ausser Dienst als Automechaniker und empfängst keine Anrufe mehr.");
    JobDuty[playerid] = 0;
    Mechanics -= 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Du bist nun im Dienst als Automechaniker und wirst Notrufe empfangen..");
    JobDuty[playerid] = 1;
    Mechanics += 1;
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 22 || PlayerInfo[playerid][pMember] == 22)
    {
    if(IsPlayerInRangeOfPoint(playerid,3.0,1496.1060,1309.2910,1093.2869))
    {
    if(FWDuty[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Du hast dich für den Dienst ausgerüstet!");
    FWDuty[playerid] = 1;
    GivePlayerWeapon(playerid,42,10000);
    if(PlayerInfo[playerid][pRank] >= 10)
    {
    SetPlayerSkin(playerid,279);
    }
    else
    {
    SetPlayerSkin(playerid,278);
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Du bist wieder außer Dienst.");
    FWDuty[playerid] = 0;
    ResetPlayerWeapons(playerid);
    SetPlayerSkin(playerid, 274);
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du kannst nicht in den Dienst gehen!");
    }
    }
    return 1;
    }

    MfG

  • Zeile 10:
    || IsPlayerInRangeOfPoint(playerid,3.0, 217.8921,78.9727,1005.0391 || IsPlayerInRangeOfPoint(playerid,3.0,-1341.8116,496.1546,11.1953)


    Ändern in:
    || IsPlayerInRangeOfPoint(playerid,3.0, 217.8921,78.9727,1005.0391) || IsPlayerInRangeOfPoint(playerid,3.0,-1341.8116,496.1546,11.1953)


    Hast dort eine Klammer vergessen.