/fbiduty , fettes Problem

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 ich habe grade ein kleines /duty für FBI's gemacht und wollte fragen was daran falsch ist weil der Pawn Compiler einfach abstürtzt:


    if(strcmp(cmd, "/fbiduty", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pMember] == 21||PlayerInfo[playerid][pLeader] == 21)
    {
    if (PlayerToPoint(3.0,playerid,254.4851,76.6072,1003.6406))
    {
    if(OnDuty[playerid]==0)
    {
    format(string, sizeof(string), "* FBI-Agent %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);
    SetPlayerColor(playerid, NAMECOLOR_FBI);
    GivePlayerWeapon(playerid, 41, 500); //spray
    GivePlayerWeapon(playerid, 3, 0); //Nightstick
    GivePlayerWeapon(playerid, 27, 100); //Combat Shotgun
    GivePlayerWeapon(playerid, 23, 500); //Silenced
    GivePlayerWeapon(playerid, 29, 500); //MP5
    GivePlayerWeapon(playerid, 34, 50); //Sniper Rifle
    OnDuty[playerid] = 1;
    }
    else if(OnDuty[playerid]==1)
    {
    format(string, sizeof(string), "* FBI-Agent %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);
    SetPlayerColor(playerid, COLOR_WHITE);
    ResetPlayerWeapons(giveplayerid);
    OnDuty[playerid] = 0;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist in keiner Umkleide !");
    return 1;
    }
    }



    Lg

    2 Mal editiert, zuletzt von Godzilla ()

  • if(strcmp(cmd, "/fbiduty", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pMember] == 21||PlayerInfo[playerid][pLeader] == 21)
    {
    if (PlayerToPoint(3.0,playerid,254.4851,76.6072,1003.6406))
    {
    if(OnDuty[playerid]== 0)
    {
    format(string, sizeof(string), "* FBI-Agent %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);
    SetPlayerColor(playerid, NAMECOLOR_FBI);
    GivePlayerWeapon(playerid, 41, 500); //spray
    GivePlayerWeapon(playerid, 3, 0); //Nightstick
    GivePlayerWeapon(playerid, 27, 100); //Combat Shotgun
    GivePlayerWeapon(playerid, 23, 500); //Silenced
    GivePlayerWeapon(playerid, 29, 500); //MP5
    GivePlayerWeapon(playerid, 34, 50); //Sniper Rifle
    OnDuty[playerid] = 1;
    }
    else if(OnDuty[playerid]== 1)
    {
    format(string, sizeof(string), "* FBI-Agent %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);
    SetPlayerColor(playerid, COLOR_WHITE);
    ResetPlayerWeapons(giveplayerid);
    OnDuty[playerid] = 0;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist in keiner Umkleide !");
    return 1;
    }
    }



    Probiers mal so bin mir nicht sicher obs geht

  • Bekomme 26 Errors :


    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2636) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2640) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2652) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2656) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2660) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2664) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2668) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2672) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2676) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2688) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2692) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2696) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2700) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2704) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2716) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2720) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2724) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2736) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2740) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2752) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2756) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2760) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2764) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2768) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2772) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(2776) : error 004: function "PlayerToPoint" is not implemented


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



    26 Errors.


    Aber an diesen angegeben Zeilen ist alles Korrekt und der Befehl befindet sich auch nicht in den angegeben Zeilen


    /Edit: wo denn zum schluss?

  • if(strcmp(cmd, "/fbiduty", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pMember] == 21||PlayerInfo[playerid][pLeader] == 21)
    {
    if (PlayerToPoint(3.0,playerid,254.4851,76.6072,1003.6406))
    {
    if(OnDuty[playerid]==0)
    {
    format(string, sizeof(string), "* FBI-Agent %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);
    SetPlayerColor(playerid, NAMECOLOR_FBI);
    GivePlayerWeapon(playerid, 41, 500); //spray
    GivePlayerWeapon(playerid, 3, 0); //Nightstick
    GivePlayerWeapon(playerid, 27, 100); //Combat Shotgun
    GivePlayerWeapon(playerid, 23, 500); //Silenced
    GivePlayerWeapon(playerid, 29, 500); //MP5
    GivePlayerWeapon(playerid, 34, 50); //Sniper Rifle
    OnDuty[playerid] = 1;
    }
    else if(OnDuty[playerid]==1)
    {
    format(string, sizeof(string), "* FBI-Agent %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);
    SetPlayerColor(playerid, COLOR_WHITE);
    ResetPlayerWeapons(giveplayerid);
    OnDuty[playerid] = 0;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist in keiner Umkleide !");
    return 1;
    }
    }
    }
    }

  • Puhhh, der großteil der Errors ist schon weg nurnoch 4 warnings:


    [hide]C:\Users\Yigit\Desktop\Forum\GRDS.pwn(18341) : warning 217: loose indentation
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(18352) : warning 217: loose indentation
    C:\Users\Yigit\Desktop\Forum\GRDS.pwn(18360) : warning 217: loose indentation
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Warnings.
    [/hide]


    und hier die Zeilen:


    if(strcmp(cmd, "/fbiduty", true) == 0)// Das ist 18341


    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);//18352


    OnDuty[playerid] = 1;//18360