4 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
  • Ich habe etwas aus dem forum hier bei mir kein kopiert aber bekomme errors-.-
    brauche eure hilfe...hier mein script:



    #include <a_samp>
    #include <a_samp>
    #include <core>
    #include <float>
    #include <time>
    #include <file>
    #include <utils>
    #include <morphinc>


    static gTeam[MAX_PLAYERS];


    #pragma tabsize 0
    #define COLOR_YELLOW 0xFFFF00AA
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_RED 0xAA3333AA
    #define FILTERSCRIPT
    #define TEAM_BLUE 2
    forward GateCloseFbi();
    forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);


    new tor;
    new tor2;
    new pickup;



    public OnFilterScriptInit() {
    tor = CreateObject(980, 923.394, -1214.95, 18.7609, 0.0000, 360, 270);//Tor Rechts
    tor2 = CreateObject(980, 923.394, -1226.45, 18.7609, 0.0000, 360, 90);//Tor Links
    AddStaticPickup(1239, 19, 1553.3384,-1675.8059,16.1953); //PD Eingang


    CreateObject(974, 923.471, -1208.18, 16.3871, 0.0000, 0.0000, 90); //Zaun1



    print("\n--------------------------------------");
    print(" All in one FS By Kevin");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit() {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[]) {


    if (strcmp(cmdtext, "/fbi", true)==0) {
    if (gTeam[playerid] == TEAM_BLUE) {
    MoveObject(tor, 923.394, -1214.95, 13.0609, 3.5);
    MoveObject(tor2, 923.394, -1226.45, 13.0609, 3.5);
    SetTimer("GateClosefbi", 5000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Willkommen im FBI HQ");


    return 1;
    } else {
    SendClientMessage(playerid, 0xAA3333AA, "Du bist kein Bulle");
    }
    }
    return 0;
    }


    public GateCloseFbi() {
    MoveObject (tor, 923.394, -1214.95, 18.7609, 10.0);
    MoveObject (tor2, 923.394, -1226.45, 18.7609, 10.0);
    return 1;
    }
    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    if (PlayerToPoint(2.0, playerid, 1553.919.75,-1265.30.8059,15.17)) // PD Eingang
    {
    SetPlayerPos(playerid, 246,258.62,108.58,1003.22);
    SetPlayerInterior(playerid, 10);
    GameTextForPlayer(playerid, "~y~Willkommen ~b~im ~r~Police ~w~Department", 5000, 5);
    }
    return 1;
    }

    und das meine errors:
    C:\Users\Kevin\Desktop\FbiBase.pwn(68 ) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Kevin\Desktop\FbiBase.pwn(68 ) : error 029: invalid expression, assumed zero
    C:\Users\Kevin\Desktop\FbiBase.pwn(68 ) : warning 215: expression has no effect
    C:\Users\Kevin\Desktop\FbiBase.pwn(68 ) : warning 215: expression has no effect
    C:\Users\Kevin\Desktop\FbiBase.pwn(68 ) : error 001: expected token: ";", but found "."
    C:\Users\Kevin\Desktop\FbiBase.pwn(68 ) : fatal error 107: too many error messages on one line


    aber wo is mein problem?

  • ja geil, du hast es aus dem forum kopiert...^^
    public OnPlayerCommandText(playerid, cmdtext[]) {


    if (strcmp(cmdtext, "/fbi", true)==0) {
    if (gTeam[playerid] == TEAM_BLUE) {
    MoveObject(tor, 923.394, -1214.95, 13.0609, 3.5);
    MoveObject(tor2, 923.394, -1226.45, 13.0609, 3.5);
    SetTimer("GateClosefbi", 5000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Willkommen im FBI HQ"); }
    else {
    SendClientMessage(playerid, 0xAA3333AA, "Du bist kein Bulle"); }
    return 1;
    }
    return 0;
    }
    public GateClosefbi() {
    MoveObject (tor, 923.394, -1214.95, 18.7609, 10.0);
    MoveObject (tor2, 923.394, -1226.45, 18.7609, 10.0);
    return 1;
    }

    dann mach nomma ganz nach unten
    stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
    {
    if(IsPlayerConnected(playerid))
    {
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
    return 1;
    }
    }
    return 0;
    }
    und das mit deim Pickup muss heißen:
    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    if(pickupid ==nummer des pickups) {//es wird bei 0 angefangen zu zählen!
    SetPlayerPos(playerid, 246,258.62,108.58,1003.22);
    SetPlayerInterior(playerid, 10);
    GameTextForPlayer(playerid, "~y~Willkommen ~b~im ~r~Police ~w~Department", 5000, 5);
    }
    return 1;
    }

  • #include <a_samp>
    #include <a_samp>
    #include <core>
    #include <float>
    #include <time>
    #include <file>
    #include <utils>
    #include <morphinc>


    static gTeam[MAX_PLAYERS];


    #pragma tabsize 0
    #define COLOR_YELLOW 0xFFFF00AA
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_RED 0xAA3333AA
    #define FILTERSCRIPT
    #define TEAM_BLUE 2
    forward GateCloseFbi();
    forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);



    new tor;
    new tor2;
    new pickup;



    public OnFilterScriptInit() {
    tor = CreateObject(980, 923.394, -1214.95, 18.7609, 0.0000, 360, 270);//Tor Rechts
    tor2 = CreateObject(980, 923.394, -1226.45, 18.7609, 0.0000, 360, 90);//Tor Links
    pickup =CreatePickup(1239, 19, 1553.3384,-1675.8059,16.1953); //PD Eingang


    CreateObject(974, 923.471, -1208.18, 16.3871, 0.0000, 0.0000, 90); //Zaun1



    print("\n--------------------------------------");
    print(" All in one FS By Kevin");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit() {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[]) {


    if (strcmp(cmdtext, "/fbi", true)==0) {
    if (gTeam[playerid] == TEAM_BLUE) {
    MoveObject(tor, 923.394, -1214.95, 13.0609, 3.5);
    MoveObject(tor2, 923.394, -1226.45, 13.0609, 3.5);
    SetTimer("GateClosefbi", 5000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Willkommen im FBI HQ");


    return 1;
    } else {
    SendClientMessage(playerid, 0xAA3333AA, "Du bist kein Bulle");
    }
    }
    return 0;
    }


    public GateCloseFbi() {
    MoveObject (tor, 923.394, -1214.95, 18.7609, 10.0);
    MoveObject (tor2, 923.394, -1226.45, 18.7609, 10.0);
    return 1;
    }
    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    if(pickupid ==pickup) {
    SetPlayerPos(playerid, 258.62,108.58,1003.22);
    SetPlayerInterior(playerid, 10);
    GameTextForPlayer(playerid, "~y~Willkommen ~b~im ~r~Police ~w~Department", 5000, 5);
    }
    return 1;
    }



    public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
    {
    if(IsPlayerConnected(playerid))
    {
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
    return 1;
    }
    }
    return 0;
    }


    Allerdings musst du deine Koordinaten überarbeiten:
    Zeile 70:
    SetPlayerPos(playerid, 246,258.62,108.58,1003.22);//falsche koordinaten
    beachte:
    (playerid,x,y,z);
    Zeile 69:
    if (PlayerToPoint(2.0, playerid, 1553.919.75,-1265.30.8059,15.17)) // falche Koordinaten
    beachte:
    if (PlayerToPoint(Umfang, playerid, x,y,z))

    ICQ Scripting - Support 495961653
    Montags-Freitags ab 15 Uhr

  • #include <a_samp>
    #include <a_samp>
    #include <core>
    #include <float>
    #include <time>
    #include <file>
    #include <utils>
    #include <morphinc>


    static gTeam[MAX_PLAYERS];


    #pragma tabsize 0
    #define COLOR_YELLOW 0xFFFF00AA
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_RED 0xAA3333AA
    #define FILTERSCRIPT
    #define TEAM_BLUE 2
    forward GateCloseFbi();
    forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);



    new tor;
    new tor2;
    new pickup;



    public OnFilterScriptInit() {
    tor = CreateObject(980, 923.394, -1214.95, 18.7609, 0.0000, 360, 270);//Tor Rechts
    tor2 = CreateObject(980, 923.394, -1226.45, 18.7609, 0.0000, 360, 90);//Tor Links
    pickup =CreatePickup(1239, 19, 1553.3384,-1675.8059,16.1953); //PD Eingang


    CreateObject(974, 923.471, -1208.18, 16.3871, 0.0000, 0.0000, 90); //Zaun1



    print("\n--------------------------------------");
    print(" All in one FS By Kevin");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit() {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[]) {


    if (strcmp(cmdtext, "/fbi", true)==0) {
    if (gTeam[playerid] == TEAM_BLUE) {
    MoveObject(tor, 923.394, -1214.95, 13.0609, 3.5);
    MoveObject(tor2, 923.394, -1226.45, 13.0609, 3.5);
    SetTimer("GateClosefbi", 5000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Willkommen im FBI HQ");


    return 1;
    } else {
    SendClientMessage(playerid, 0xAA3333AA, "Du bist kein Bulle");
    }
    }
    return 0;
    }


    public GateCloseFbi() {
    MoveObject (tor, 923.394, -1214.95, 18.7609, 10.0);
    MoveObject (tor2, 923.394, -1226.45, 18.7609, 10.0);
    return 1;
    }
    public OnPlayerPickUpPickup(playerid, pickupid)
    if(pickupid ==pickup) {
    if(PlayerToPoint(3.0,playerid,919.75,-1265.30,15.17)); //Waffenkammer
    SetPlayerPos(playerid, 258.62,108.58,1003.22);
    SetPlayerInterior(playerid, 10);
    GameTextForPlayer(playerid, "~y~Willkommen ~b~im ~r~Police ~w~Department", 5000, 5);
    }



    public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
    {
    if(IsPlayerConnected(playerid))
    {
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
    return 1;
    }
    }
    return 0;
    }


    das kommt bei raus wenn ich denke das ich alles richtig mache-.-


    errors:


    C:\Users\Kevin\Desktop\FbiBase.pwn(69) : error 036: empty statement
    C:\Users\Kevin\Desktop\FbiBase.pwn(93) : warning 203: symbol is never used: "IsNumeric"
    C:\Users\Kevin\Desktop\FbiBase.pwn(93) : warning 203: symbol is never used: "ReturnUser"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error. ;(

    Einmal editiert, zuletzt von Kavkus ()

  • Kann man Zeile 69 nicht gleich ganz weglassen?
    Wenn der Spieler den Pickup aufhebt ist es gar nicht mehr nötig, zu überprüfen, ob er sich an diesem Punkt befindet.

    ICQ Scripting - Support 495961653
    Montags-Freitags ab 15 Uhr

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • stock PlayerToPoint, nicht public!
    dein
    if(pickupid ==pickup) {
    muss heißen:
    if(pickupid ==nummber des pickups, z.B. 5) {


    //EDIT: wozu hab ich dir eig das richitge gepostet, wenn du es eh nciht übernimmst?

    Ob Funktion oder mit stock ist gleichgültig.. Ich habe es als Funktion in meinem Script und funktioniert einwandfrei-


    Und eine Pickupid muss keine Zahl sein, sofern sie auch vorher definiert wurde.
    Denn hinter "pickup" verbirgt sich schon eine Zahl, die ID des Pickups.
    new pickup;
    pickup =CreatePickup(1239, 19, 1553.3384,-1675.8059,16.1953); //PD Eingang
    Ist zwar wie Du es beschreibst richtig, aber es muss nicht "muss heißen" heißen. :)
    Im Gegenteil zu Anderen teste ich auch meine Scripte.

    ICQ Scripting - Support 495961653
    Montags-Freitags ab 15 Uhr

    Einmal editiert, zuletzt von TheKekes ()