Scriptfehler

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 20 Erros hier das Script:
    // This is a comment
    // uncomment the line below if you want to write a filterscript
    //#define FILTERSCRIPT


    #include <a_samp>


    #if defined FILTERSCRIPT



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


    public OnFilterScriptExit()
    {
    return 1;
    }


    #else


    main()
    {
    print("\n----------------------------------");
    print(" FUN For you by Beri");
    print("----------------------------------\n");
    }


    #endif


    public OnGameModeInit()
    {
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
    }


    public OnGameModeExit()
    {
    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("/regeln", cmdtext, true, 10) == 0)
    {
    SendClientMessage(playerid,0xFFFFFFAA,"REGELN:Du darfst nicht sinnlos DM machen nur in DM Arenen.");
    SendClientMessage(playerid, 0xFFFFFFAA, "REGELN:Du darfst nicht beleidigen.");
    SendClientMessage(playerid, 0xFFFFFFAA, "REGELN:Du darfst nicht totparken.");
    SendClientMessage(playerid, 0xFFFFFFAA, "REGELN:Du darfst Spaß haben.");
    return 1;
    }
    }
    if (strcmp("/MP5", cmdtext, true, 10) == 0)
    (
    GivePlayerWeapon(playerid, 29, 500);
    SendClientMessage(playerid, 0xFFFFFFAA,"Du hast dir eine MP5 gespawnt.");
    return 1;
    }
    }
    if (strcmp("/Weaponhelp", cmdtext, true, 10) == 0)
    (
    SendClientMessage(playerid, 0xFFFFFFAA,"Es gibt diese Waffen:");
    SendClientMessage(playerid, 0xFFFFFFAA,"/MP5 , /AK47 /Granate , /M4 /Deagle /Dildo");
    return 1;
    }
    }
    if (strcmp("/AK47", cmdtext, true, 10) == 0)
    {
    GivePlayerWeapon(playerid, 30, 500);
    SendClientMessage(playerid, 0xFFFFFFAA,"Du hast dir eine AK47 gespawnt.");
    return 1;
    }
    }
    if (strcmp("/Granate", cmdtext, true, 10) == 0)
    (
    GivePlayerWeapon(playerid, 16, 10);
    SendClientMessage(playerid, 0xFFFFFFAA,"Du hast dir Granaten gespawnt.");
    return 1;
    }
    }
    if (strcmp("/M4", cmdtext, true, 10) == 0)
    (
    GivePlayerWeapon(playerid, 31, 500);
    SendClientMessage(playerid, 0xFFFFFFAA,"Du hast dir eine M4 gespawnt.");
    return 1;
    }
    }
    if (strcmp("/Deagle", cmdtext, true, 10) == 0)
    (
    GivePlayerWeapon(playerid, 24, 200);
    SendClientMessage(playerid,0xFFFFFFAA,"Du hast dir eine Deagle gespawnt.");
    return 1;
    }
    }
    if (strcmp("/Dildo", cmdtext, true, 10) == 0)
    (
    GivePlayerWeapon(playerid, 10, 1);
    SendClientMessage(playerid, 0xFFFFFFAA,"Du hast dir einen Dildo gespawnt.");
    return 1;
    }
    }
    if (strcmp("/Help", cmdtext, true, 10) == 0)
    (
    SendClientMessage(playerid, 0xFFFFFFAA,"BEFEHLE:/Weaponhelp /Admins /regeln /ah [Nur für Admins]");
    return 1;
    }
    }
    if (strcmp("/Admins", cmdtext, true, 10) == 0)
    (
    SendClientMessage(playerid, 0xFFFFFFAA,"Server Owner:Beri");
    SendClientMessage(playerid, 0xFFFFFFAA,"Server Scripter:Beri");
    SendClientMessage(playerid, 0xFFFFFFAA,"Server Mapper:Beri");
    return 1;
    }
    }
    if (strcmp("/Ah", cmdtext, true, 10) == 0)
    (
    SendClientMessage(playerid, 0xFFFFFFAA ,"Admin Panel:");
    SendClientMessage(playerid, 0xFFFFFFAA,"Du loggst dich als Rcon Admin ein /rcon login [password]");
    SendClientMessage(playerid, 0xFFFFFFAA,"Du drückst Tab.");
    SendClientMessage(playerid, 0xFFFFFFAA,"Du klickst zwei mal auf den Spieler dann kannst du auswählen was du machen willst.");
    SendClientMessage(playerid, 0xFFFFFFAA,"Event:");
    SendClientMessage(playerid, 0xFFFFFFAA,"Du musst du als Rcon Admin einloggen /rcon login [password]");
    SendClientMessage(playerid, 0xFFFFFFAA,"Danach gibst du /event ein um das Event zu starten.");
    SendClientMessage(playerid, 0xFFFFFFAA,"Dann wählst du die Eventart aus.");
    SendClientMessage(playerid, 0xFFFFFFAA,"Danach werden 10 Autos gespawnt.");
    SendClientMessage(playerid, 0xFFFFFFAA,"Mit /count machst du einen Countdown.");
    SendClientMessage(playerid, 0xFFFFFFAA,"Mit /cp machst du einen Checkpoint");
    SendClientMessage(playerid, 0xFFFFFFAA,"Und mit /Startevent startest du das Event.");


    return 1;
    }
    }



    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;
    }
    }


    Und hier die Errors:


    Bitte helft mir.


    //Edit neues Script eingefügt.
    //Edit 2 Wieder neues Script und neue Errors reingemacht.

    5 Mal editiert, zuletzt von Script4ever ()

  • Oha, da mangelt es ja an Grundkenntnissen.


    ein Beispiel aus deinem Script


    SendClientMessage(playerid, 0xFFFFFFAA,Du hast dir eine Deagle gespawnt.");


    muss natürlich zu


    SendClientMessage(playerid, 0xFFFFFFAA,"Du hast dir eine Deagle gespawnt.");


    alles was in "" steht, wertet der Compiler als Text (String).


    das sieht man schon an der formatierung des Ganzen.