Problem mit filterscripts

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 bekomme beim complimieren von dem filterscripts immer diese errors


    C:\Users\user\Desktop\ORGINAL SERVER\pawno\include\M_Bot.inc(164) : error 017: undefined symbol "IsAnAdmin"
    C:\Users\user\Desktop\ORGINAL SERVER\pawno\include\M_Bot.inc(603) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
    C:\Users\user\Desktop\ORGINAL SERVER\filterscripts\test_cmds.pwn(22) : error 010: invalid function or declaration
    C:\Users\user\Desktop\ORGINAL SERVER\filterscripts\test_cmds.pwn(34) : error 029: invalid expression, assumed zero
    C:\Users\user\Desktop\ORGINAL SERVER\filterscripts\test_cmds.pwn(34) : error 004: function "FBIDOORTimer" is not implemented
    C:\Users\user\Desktop\ORGINAL SERVER\filterscripts\test_cmds.pwn(40) : error 030: compound statement not closed at the end of file (started at line 26)
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    5 Errors.


    #include <a_samp>
    #include <a_npc>
    #include <core>
    #include <float>
    #include <time>
    #include <dini>
    #include <file>
    #include <utils>
    #include <morphinc>
    #include <M_Bot>
    #include <streamer>
    #include <w_baum>
    #include <ocmd>
    #include <Desk>
    #include bfx_objects
    #pragma dynamic 8192
    #pragma tabsize 0


    //On game/filterscript init
    new FBIDOOR;
    forward FBIDOORTimer();
    FBIDOOR = CreateObject(1500,1294.18371582,553.40069580,1066.67248535,0.0,0.0,90.0);


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext, "/open", true)==0)
    {
    // FBI DOOR
    SetTimer("FBIDOORTimer", 3000, 0);
    MoveObject (FBIDOOR,1294.15979004,554.91510010,1066.67248535,3);
    return 1;
    }


    public FBIDOORTimer()
    {
    MoveObject(FBIDOOR,1294.18371582,553.40069580,1066.67248535,3);


    return 1;
    }

  • Zitat

    error 004: function "FBIDOORTimer" is not implemented


    forward FBIDOORTimer();
    Das kommt außerhalb des Publics OnFilterscript(Game)ModeINit

    Zitat

    error 017: undefined symbol "IsAnAdmin"


    Es ist nicht definiert.
    Der Fehler befindet sich im Include M_Bot erneuere das.

    Zitat

    new FBIDOOR;


    Das kommt ebenfalls außerhalb des Publics OnFilterscript(Game)ModeINit

  • new FBIDOOR;
    forward FBIDOORTimer();
    public OnFilterscriptInit()
    {
    return 1;
    }


    FBIDOOR = CreateObject(1500,1294.18371582,553.40069580,1066.67248535,0.0,0.0,90.0);


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext, "/open", true)==0)
    {
    // FBI DOOR
    SetTimer("FBIDOORTimer", 3000, 0);
    MoveObject (FBIDOOR,1294.15979004,554.91510010,1066.67248535,3);
    return 1;
    }


    public FBIDOORTimer()
    {
    MoveObject(FBIDOOR,1294.18371582,553.40069580,1066.67248535,3);


    return 1;
    }


    ich hab das jetzt so bekomme aber noch 4 errors


    warning 235: public function lacks forward declaration (symbol "OnFilterscriptInit")
    C:\Users\user\Desktop\ORGINALU SERVER\filterscripts\test_cmds.pwn(25) : error 010: invalid function or declaration
    C:\Users\user\Desktop\ORGINAL SERVER\filterscripts\test_cmds.pwn(37) : error 029: invalid expression, assumed zero
    C:\Users\user\Desktop\ORGINAL SERVER\filterscripts\test_cmds.pwn(37) : error 004: function "FBIDOORTimer" is not implemented
    C:\Users\user\Desktop\ORGINAL SERVER\filterscripts\test_cmds.pwn(43) : error 030: compound statement not closed at the end of file (started at line 29)
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.

  • Ich glaub du hast da was falsch verstanden.
    Das Grundscript sieht doch so aus:
    #define FILTERSCRIPT


    #include <a_samp>



    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }



    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 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 OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
    // Do something here
    return 1;
    }
    return 0;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }


    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnRconCommand(cmd[])
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnObjectMoved(objectid)
    {
    return 1;
    }


    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }


    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }


    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }


    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }


    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }


    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }


    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    return 1;
    }


    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }


    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    return 1;
    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }
    Das was ich jetzt meinte sieht so aus:


    #define FILTERSCRIPT


    #include <a_samp>
    new FBIDOOR;
    forward FBIDOORTimer();


    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    FBIDOOR = CreateObject(1500,1294.18371582,553.40069580,1066.67248535,0.0,0.0,90.0);
    return 1;
    }
    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext, "/open", true)==0)
    {
    // FBI DOOR
    SetTimer("FBIDOORTimer", 3000, 0);
    MoveObject (FBIDOOR,1294.15979004,554.91510010,1066.67248535,3);
    return 1;
    }
    return 1;
    ]


    Und das hier ganz nach unten ins Script
    public FBIDOORTimer()
    {
    MoveObject(FBIDOOR,1294.18371582,553.40069580,1066.67248535,3);


    return 1;
    }