Filterscript 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
  • Ich hab ein Filterscript erstellt und noch paar sachen aus Breadfish rein geholt aber es kommen immer diese Error meldungen...


    C:\Dokumente und Einstellungen\Anwender\Desktop\Kopie von Server\filterscripts\LEER.pwn(17) : warning 201: redefinition of constant/macro (symbol "COLOR_RED")
    C:\Dokumente und Einstellungen\Anwender\Desktop\Kopie von Server\filterscripts\LEER.pwn(423) : error 001: expected token: "#endif", but found "-end of file-"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    Das ist der FIlterscript......



    #define COLOR_LIGHTBLUE 0x33CCFFAA
    #define COLOR_RED 0xAA3333AA
    #define COLOR_GREY 0xAFAFAFAA
    #define COLOR_PURPLE 0xC2A2DAAA
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_DBLUE 0x2641FEAA
    #define COLOR_BLUE 0x33AAFFFF
    #define COLOR_GREEN 0x33AA33AA
    #define COLOR_ORANGE 0xFF9900AA
    #define COLOR_PINK 0xFF69B4FF
    #define COLOR_BGREEN 0x08FD04FF
    #define COLOR_CYAN 0x00FFFFAA
    #define COLOR_RED 0xFF3366FF
    #define COLOR_YELLOW 0xFFCC33FF
    #define COLOR_DGREEN 0x008000FF
    #define COLOR_DRED 0x800000FF
    #define COLOR_DARK 0x000000FF



    orward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
    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);
    //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
    return 1;
    }
    }
    return 0;
    }
    public OnFilterScriptInit()
    {


    CreateObject(971, 1181.533569, -897.506592, 47.013580, 90.2409, 4.2972, 3.4377);// BSN Park
    CreateObject(971, 1183.869263, -911.674988, 46.826981, 90.2409, 4.2972, 4.2972);//Bsn Park
    CreateObject(4639, 1183.000854, -910.254700, 43.990814, 0.0000, 0.0000, 186.0934);// BSN Park
    CreateObject(973, 1189.797974, -894.036560, 47.852718, 0.0000, 0.0000, 186.4979);


    PDDOORa = CreateObject( 985 , 247.005905 , 72.448440 , 1003.640625 , 0.000000 , 0.000000 , 1260.000000 );
    PDDOORd = CreateObject( 986 , 248.248901 , 87.360313 , 1003.467834 , 0.000000 , 0.000000 , 12690.000000 );
    CELLDOOR = CreateObject( 989 , 266.238403 , 81.891395 , 1001.039062 , 0.000000 , 0.000000 , 10816.000000 );
    PDGATE = CreateObject( 987 , 1546.113769 , -1621.810913 , 11.709331 , 0.000000 , 0.000000 , 990.000000 );
    COMPOUNDGATE = CreateObject( 986 , 1591.682861 , -1617.880371 , 12.053466 , 0.000000 , 0.000000 , 0.000000 );


    Park = CreateObject(971, 1182.252441, -904.438293, 42.308212, 90.2409, 4.2972, 3.4377);
    Parkhilfe = CreatePickup(1239,1,1179.9429,-910.6104,43.2481);


    print("\n--------------------------------------");
    print(" Paar verrbesserungen Scriptet by alex ");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    #else


    main()


    {
    print("\n----------------------------------");
    print(" Scriptet by Alex ");
    print("----------------------------------\n");
    }


    #endif


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public OnPlayerPrivmsg(playerid, recieverid, text[])
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp(cmdtext, "/lspddooropen", true)==0)
    {
    MoveObject(PDDOORa,247.005905 , 72.448440 , 1003.640625,3.5);//close
    MoveObject(PDDOORa,247.005905 , 72.448440 , 1006.912902,3.5);//open
    SetTimer("PDDOORa", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Tür geöffnet!");
    return 1;
    }


    if (strcmp(cmdtext, "/lspddoorclose", true)==0)
    {
    MoveObject(PDDOORa,247.005905 , 72.448440 , 1006.912902,3.5);//open
    MoveObject(PDDOORa,247.005905 , 72.448440 , 1003.640625,3.5);//close
    SendClientMessage(playerid, COLOR_YELLOW,"Tür geschlossen!");
    return 1;
    }


    if (strcmp(cmdtext, "/pd4op", true)==0)
    {
    MoveObject(PDDOORd,248.248901 , 87.360313 , 1003.467834,3.5);//close
    MoveObject(PDDOORd,248.248901 , 87.360313 , 1006.931152,3.5);//open
    SetTimer("PDDOORd", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Sicherheits Tür 1 geöffnet!");
    return 1;
    }


    if (strcmp(cmdtext, "/pd4cl", true)==0)
    {
    MoveObject(PDDOORd,248.248901 , 87.360313 , 1006.931152,3.5);//open
    MoveObject(PDDOORd,248.248901 , 87.360313 , 1003.467834,3.5);//close
    SendClientMessage(playerid, COLOR_YELLOW,"Sicherheits Tür 1 geschlossen!");
    return 1;
    }


    if (strcmp(cmdtext, "/zelleopen", true)==0)
    {
    MoveObject(CELLDOOR,266.238403 , 81.891395 , 1001.039062,3.5);//close
    MoveObject(CELLDOOR,266.238403 , 81.891395 , 1004.377380,3.5);//open
    SetTimer("CELLDOOR", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Zelltür geöffnet!");
    return 1;
    }


    if (strcmp(cmdtext, "/zelleclose", true)==0)
    {
    MoveObject(CELLDOOR,266.238403 , 81.891395 , 1004.377380,3.5);//open
    MoveObject(CELLDOOR,266.238403 , 81.891395 , 1001.039062,3.5);//close
    SendClientMessage(playerid, COLOR_YELLOW,"Zelltür geschlossen!");
    return 1;
    }


    if (strcmp(cmdtext, "/lspdgateopen", true)==0)
    {
    MoveObject(PDGATE,1546.113769 , -1621.810913 , 11.709331,3.5);//close
    MoveObject(PDGATE,1546.113769 , -1621.810913 , 5.644468,3.5);//open
    SetTimer("PDGATE", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Tor zum LSPD Gelände geöffnet!");
    return 1;
    }


    if (strcmp(cmdtext, "/lspdgateclose", true)==0)
    {
    MoveObject(PDGATE,1546.113769 , -1621.810913 , 5.644468,3.5);//open
    MoveObject(PDGATE,1546.113769 , -1621.810913 , 11.709331,3.5);//close
    SendClientMessage(playerid, COLOR_YELLOW,"Tor zum LSPD Gelände geschloßen!");
    return 1;
    }


    if (strcmp(cmdtext, "/lspdparkopen", true)==0)
    {
    MoveObject(COMPOUNDGATE,1591.682861 , -1617.880371 , 12.053466,3.5);//close
    MoveObject(COMPOUNDGATE,1583.598754 , -1617.880371 , 12.053466,3.5);//open
    SetTimer("COMPOUNDGATE", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Gefängnishof offen!");
    return 1;
    }


    if (strcmp(cmdtext, "/lspdparkclose", true)==0)
    {
    MoveObject(COMPOUNDGATE,1583.598754 , -1617.880371 , 12.053466,3.5);//open
    MoveObject(COMPOUNDGATE,1591.682861 , -1617.880371 , 12.053466,3.5);//close
    SendClientMessage(playerid, COLOR_YELLOW,"Gefängnishof zu!");
    return 1;



    Kann mir bitte einer weiterhelfen....


    PS ich hab nicht alles aus sicherheits gründen rein gemacht

  • #define COLOR_LIGHTBLUE 0x33CCFFAA
    #define COLOR_RED 0xAA3333AA //hier hast du red definiert
    #define COLOR_GREY 0xAFAFAFAA
    #define COLOR_PURPLE 0xC2A2DAAA
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_DBLUE 0x2641FEAA
    #define COLOR_BLUE 0x33AAFFFF
    #define COLOR_GREEN 0x33AA33AA
    #define COLOR_ORANGE 0xFF9900AA
    #define COLOR_PINK 0xFF69B4FF
    #define COLOR_BGREEN 0x08FD04FF
    #define COLOR_CYAN 0x00FFFFAA
    #define COLOR_BRED 0xFF3366FF //hier hast du red definiert, eines der beiden muss weg, oder du änderst den namen... (ich habe es jetzt BRED genannt)
    #define COLOR_YELLOW 0xFFCC33FF
    #define COLOR_DGREEN 0x008000FF
    #define COLOR_DRED 0x800000FF
    #define COLOR_DARK 0x000000FF



    orward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
    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);
    //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
    return 1;
    }
    }
    return 0;
    }
    public OnFilterScriptInit()
    {

    CreateObject(971, 1181.533569, -897.506592, 47.013580, 90.2409, 4.2972, 3.4377);// BSN Park
    CreateObject(971, 1183.869263, -911.674988, 46.826981, 90.2409, 4.2972, 4.2972);//Bsn Park
    CreateObject(4639, 1183.000854, -910.254700, 43.990814, 0.0000, 0.0000, 186.0934);// BSN Park
    CreateObject(973, 1189.797974, -894.036560, 47.852718, 0.0000, 0.0000, 186.4979);

    PDDOORa = CreateObject( 985 , 247.005905 , 72.448440 , 1003.640625 , 0.000000 , 0.000000 , 1260.000000 );
    PDDOORd = CreateObject( 986 , 248.248901 , 87.360313 , 1003.467834 , 0.000000 , 0.000000 , 12690.000000 );
    CELLDOOR = CreateObject( 989 , 266.238403 , 81.891395 , 1001.039062 , 0.000000 , 0.000000 , 10816.000000 );
    PDGATE = CreateObject( 987 , 1546.113769 , -1621.810913 , 11.709331 , 0.000000 , 0.000000 , 990.000000 );
    COMPOUNDGATE = CreateObject( 986 , 1591.682861 , -1617.880371 , 12.053466 , 0.000000 , 0.000000 , 0.000000 );

    Park = CreateObject(971, 1182.252441, -904.438293, 42.308212, 90.2409, 4.2972, 3.4377);
    Parkhilfe = CreatePickup(1239,1,1179.9429,-910.6104,43.2481);

    print("\n--------------------------------------");
    print(" Paar verrbesserungen Scriptet by alex ");
    print("--------------------------------------\n");
    return 1;
    }

    public OnFilterScriptExit()
    {
    return 1;
    }

    #else

    main()

    {
    print("\n----------------------------------");
    print(" Scriptet by Alex ");
    print("----------------------------------\n");
    }

    #endif

    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
    }

    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }

    public OnPlayerConnect(playerid)
    {
    return 1;
    }

    public OnPlayerDisconnect(playerid, reason)
    {
    return 1;
    }

    public OnPlayerSpawn(playerid)
    {
    return 1;
    }

    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }

    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }

    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }

    public OnPlayerText(playerid, text[])
    {
    return 1;
    }

    public OnPlayerPrivmsg(playerid, recieverid, text[])
    {
    return 1;
    }

    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp(cmdtext, "/lspddooropen", true)==0)
    {
    MoveObject(PDDOORa,247.005905 , 72.448440 , 1003.640625,3.5);//close
    MoveObject(PDDOORa,247.005905 , 72.448440 , 1006.912902,3.5);//open
    SetTimer("PDDOORa", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Tür geöffnet!");
    return 1;
    }

    if (strcmp(cmdtext, "/lspddoorclose", true)==0)
    {
    MoveObject(PDDOORa,247.005905 , 72.448440 , 1006.912902,3.5);//open
    MoveObject(PDDOORa,247.005905 , 72.448440 , 1003.640625,3.5);//close
    SendClientMessage(playerid, COLOR_YELLOW,"Tür geschlossen!");
    return 1;
    }

    if (strcmp(cmdtext, "/pd4op", true)==0)
    {
    MoveObject(PDDOORd,248.248901 , 87.360313 , 1003.467834,3.5);//close
    MoveObject(PDDOORd,248.248901 , 87.360313 , 1006.931152,3.5);//open
    SetTimer("PDDOORd", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Sicherheits Tür 1 geöffnet!");
    return 1;
    }

    if (strcmp(cmdtext, "/pd4cl", true)==0)
    {
    MoveObject(PDDOORd,248.248901 , 87.360313 , 1006.931152,3.5);//open
    MoveObject(PDDOORd,248.248901 , 87.360313 , 1003.467834,3.5);//close
    SendClientMessage(playerid, COLOR_YELLOW,"Sicherheits Tür 1 geschlossen!");
    return 1;
    }

    if (strcmp(cmdtext, "/zelleopen", true)==0)
    {
    MoveObject(CELLDOOR,266.238403 , 81.891395 , 1001.039062,3.5);//close
    MoveObject(CELLDOOR,266.238403 , 81.891395 , 1004.377380,3.5);//open
    SetTimer("CELLDOOR", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Zelltür geöffnet!");
    return 1;
    }

    if (strcmp(cmdtext, "/zelleclose", true)==0)
    {
    MoveObject(CELLDOOR,266.238403 , 81.891395 , 1004.377380,3.5);//open
    MoveObject(CELLDOOR,266.238403 , 81.891395 , 1001.039062,3.5);//close
    SendClientMessage(playerid, COLOR_YELLOW,"Zelltür geschlossen!");
    return 1;
    }

    if (strcmp(cmdtext, "/lspdgateopen", true)==0)
    {
    MoveObject(PDGATE,1546.113769 , -1621.810913 , 11.709331,3.5);//close
    MoveObject(PDGATE,1546.113769 , -1621.810913 , 5.644468,3.5);//open
    SetTimer("PDGATE", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Tor zum LSPD Gelände geöffnet!");
    return 1;
    }

    if (strcmp(cmdtext, "/lspdgateclose", true)==0)
    {
    MoveObject(PDGATE,1546.113769 , -1621.810913 , 5.644468,3.5);//open
    MoveObject(PDGATE,1546.113769 , -1621.810913 , 11.709331,3.5);//close
    SendClientMessage(playerid, COLOR_YELLOW,"Tor zum LSPD Gelände geschloßen!");
    return 1;
    }

    if (strcmp(cmdtext, "/lspdparkopen", true)==0)
    {
    MoveObject(COMPOUNDGATE,1591.682861 , -1617.880371 , 12.053466,3.5);//close
    MoveObject(COMPOUNDGATE,1583.598754 , -1617.880371 , 12.053466,3.5);//open
    SetTimer("COMPOUNDGATE", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Gefängnishof offen!");
    return 1;
    }

    if (strcmp(cmdtext, "/lspdparkclose", true)==0)
    {
    MoveObject(COMPOUNDGATE,1583.598754 , -1617.880371 , 12.053466,3.5);//open
    MoveObject(COMPOUNDGATE,1591.682861 , -1617.880371 , 12.053466,3.5);//close
    SendClientMessage(playerid, COLOR_YELLOW,"Gefängnishof zu!");
    return 1;
    Den zweiten Fehler kann ich dir nicht sagen, weils ganz am ende vom script ist.
    diesen teil haste nicht mit eingefügt.
    ich würde dir aber jetzt mal raten,
    ganz am ende des scriptes einfach
    #endif
    zu schreiben, dann sollte es n1 laufen :P :P
    Hoffe ich konnte helfen.
    MfG
    Maxx