[Fehler]beim Script.

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
  • hi ich bins schon wieder ich habe mal wieder ein paar errors..
    ich schaue nebenher mrMonat tutorials und war bei tutorial 5 mit den Interiors und wollte mal noch ein 2 interrior machen aber dabei sind ein paar errors gekommen und ich hab mal wieder ka wie ich die beheben könnte...


    C:\Users\Besitzer\Neuer Ordner\Desktop\AGreatVillage\gamemodes\AGreatVillage.pwn(15) : warning 215: expression has no effect
    C:\Users\Besitzer\Neuer Ordner\Desktop\AGreatVillage\gamemodes\AGreatVillage.pwn(15) : warning 215: expression has no effect
    C:\Users\Besitzer\Neuer Ordner\Desktop\AGreatVillage\gamemodes\AGreatVillage.pwn(15) : warning 215: expression has no effect
    C:\Users\Besitzer\Neuer Ordner\Desktop\AGreatVillage\gamemodes\AGreatVillage.pwn(15) : warning 215: expression has no effect
    C:\Users\Besitzer\Neuer Ordner\Desktop\AGreatVillage\gamemodes\AGreatVillage.pwn(15) : error 001: expected token: ";", but found ")"
    C:\Users\Besitzer\Neuer Ordner\Desktop\AGreatVillage\gamemodes\AGreatVillage.pwn(15) : error 029: invalid expression, assumed zero
    C:\Users\Besitzer\Neuer Ordner\Desktop\AGreatVillage\gamemodes\AGreatVillage.pwn(15) : warning 215: expression has no effect
    C:\Users\Besitzer\Neuer Ordner\Desktop\AGreatVillage\gamemodes\AGreatVillage.pwn(175) : warning 217: loose indentation
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.



    und hier ist das script..
    #include <a_samp>


    new Rustybrownsdonutsenter;
    new Rustybrownsdonutexit;
    new Policeenter;
    new Policeexit;
    main()
    {
    print("\n----------------------------------");
    print("ReallifeServer");
    print("----------------------------------\n");
    }
    public OnGameModeInit()
    {
    Policeexit=246.4205,107.4670,1003.2188);
    Policeenter=CreatePickup(1559,1,-2237.0237,2354.2925,4.9799);


    Rustybrownsdonutexit=CreatePickup(1559,1,377.2035,-193.3058,1000.6328);
    Rustybrownsdonutsenter=CreatePickup(1559,1,-2385.6968,2215.9253,4.9844);


    DisableInteriorEnterExits();
    SetGameModeText("SelfmadebyLoLMa$teR");
    AddPlayerClass(26,-2417.1311,2317.6960,1.6773,124.8493,43,5,0,0,0,0); // SpielerPosition

    AddStaticVehicle(462,-2425.6128,2318.2849,4.2286,98.9876,2,1); // Faggio1
    AddStaticVehicle(462,-2422.6694,2318.7815,3.2169,101.3043,3,1); // Faggio2
    AddStaticVehicle(462,-2419.7759,2319.3223,2.2225,99.6907,12,12); // Faggio3
    AddStaticVehicle(481,-2434.0371,2317.8411,4.5001,315.3159,65,9); // BMX1
    AddStaticVehicle(481,-2434.1008,2318.7117,4.5011,312.7031,12,9); // BMX2
    AddStaticVehicle(481,-2433.9348,2308.7334,4.4969,320.8789,1,1); // BMX3
    AddStaticVehicle(481,-2434.2307,2309.9421,4.5009,319.9174,6,6); // BMX4
    AddStaticVehicle(484,-2410.4121,2312.9470,0.1689,189.2974,12,35); // Segelschiff
    AddStaticVehicle(588,-2395.2705,2222.3430,4.8922,263.3245,1,1); // HotDogWagen
    AddStaticVehicle(423,-2395.5491,2210.6934,5.0114,269.2967,1,35); // EisWagen
    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid,-2417.1311,2317.6960,1.6773);
    SetPlayerCameraPos(playerid,-2420.9812,2314.9746,2.9988);
    SetPlayerCameraLookAt(playerid,-2417.9060,2318.4167,1.9436);
    SetPlayerFacingAngle(playerid,124.8493);
    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(cmdtext,"/donuts",true)==0)
    {
    SetPlayerPos(playerid,-2384.3938,2212.9651,4.5855);
    SendClientMessage(playerid,0xFFB400FF,"Wilkommen bei RustyBrownsDonuts");
    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)
    {
    if(pickupid==Rustybrownsdonutsenter)
    {
    SetPlayerPos(playerid,376.9730,-191.9324,1000.6328);
    SetPlayerInterior(playerid,17);
    }
    if(pickupid==Rustybrownsdonutexit)
    {
    SetPlayerPos(playerid,-2387.4839,2216.4353,4.9844);
    SetPlayerFacingAngle(playerid,93.5157);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,0);
    }
    if(pickupid==Policeenter)
    {
    SetPlayerPos(playerid,246.375991,109.245994,1003.218750);
    SetPlayerInterior(playerid,10);
    }
    if(pickupid==Policeexit)
    {
    SetPlayerPos(playerid,-2237.8684,2353.3003,4.9804);
    SetPlayerFacingAngle(playerid,137.0998);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,0);
    }


    }


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

    Einmal editiert, zuletzt von LoLMa$teR ()

  • kannst du nicht lieber dein ganzen code in Pastebin.org machen?


    Hier ist alles iwie abgehackt und sieht komisch aus^^


    EDIT:Policeexit=1559,1,246.4205,107.4670,1003.2188);


    in


    Policeexit = CreatePickup(1559,1,246.4205,107.4670,1003.2188);


    ändern?

  • Hier hast du was vergessen


    C:\Users\Besitzer\Neuer Ordner\Desktop\AGreatVillage\gamemodes\AGreatVillage.pwn(15) : error 001: expected token: ";", but found ")"


    ; das will er in Zeile 15 am ende haben

  • Bei
    Policeexit=246.4205,107.4670,1003.2188);


    Da fehlt was versuch mal so


    Policeexit=(246.4205,107.4670,1003.2188);



    ahmm... siehe mein post.....


    Policeexit = CreatePickup(1559,1,246.4205,107.4670,1003.2188);


    __________________________________________________________________________________________________________________________________________



    das was du da hingeklatscht hast ergibt vorn und hinten kein Sinn oO

  • Versuch un Zukunft dein Code leserlicher zu machen! Sonst bekommst du viele "warning 217: loose indentation".


    Anders gesagt:
    if (blabla)
    {
    leertaste 4x -> blablablabla;
    leertaste 4x -> blablablabal;
    <-4 mal "löschen" }
    return 1;


    Kannst alternativ auch "tab" benuzten. Also immer nach { 4mal nach vorn oder tab und nach } 4 mal nach hinten.