Tore mit Timer 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
  • Hallo,
    habe mal versucht ein Tor mit einem Timer zu erstellen...
    bei mir treten aber Folgende Errors auf:


    I:\GTA-Reallife-Server\filterscripts\armyswatzoll.pwn(476) : error 029: invalid expression, assumed zero
    I:\GTA-Reallife-Server\filterscripts\armyswatzoll.pwn(476) : error 004: function "steffenherres3" is not implemented
    I:\GTA-Reallife-Server\filterscripts\armyswatzoll.pwn(482) : warning 225: unreachable code
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.


    Hier das Tor mit befehl etc^^ :


    • forward steffenherres3();


      new steffenherres1;


      //////////////////////////////////


      if(strcmp(cmdtext,"/spswat", true, 10) == 0)
      {
      MoveObject(steffenherres1,1532.63964844,-1451.36486816,24.80457497,4.5);
      SetTimer("steffenherres3",5000,0);
      return 1;
      }


      /////////////////////////////////


      public steffenherres3()
      {
      MoveObject(steffenherres1,1532.63964844,-1451.36486816,14.80457497,4.5);
      return 1;
      }


    wäre cool wenn mir jemmand helfen könnte :D


    Mfg Leon

  • kk hier der gesamte Teil:

    • /*
      */


      //Includes
      #include
      #include
      //Define
      #define FILTERSCRIPT


      /*---Colors---*/
      #define COLOR_GRAD1 0xB4B5B7FF
      #define COLOR_GRAD2 0xBFC0C2FF
      #define COLOR_GRAD3 0xCBCCCEFF
      #define COLOR_GRAD4 0xD8D8D8FF
      #define COLOR_GRAD5 0xE3E3E3FF
      #define COLOR_GRAD6 0xF0F0F0FF
      #define COLOR_GREY 0xAFAFAFAA
      #define COLOR_GREEN 0x33AA33AA
      #define COLOR_RED 0xAA3333AA
      #define COLOR_RED2 0xAA3333AA
      #define COLOR_LIGHTRED 0xFF6347AA
      #define COLOR_BLUE 0x33CCFFAA
      #define COLOR_LIGHTGREEN 0x9ACD32AA
      #define COLOR_YELLOW 0xFFFF00AA
      #define COLOR_YELLOW2 0xF5DEB3AA
      #define COLOR_WHITE 0xFFFFFFAA
      #define COLOR_FADE1 0xE6E6E6E6
      #define COLOR_FADE2 0xC8C8C8C8
      #define COLOR_FADE3 0xAAAAAAAA
      #define COLOR_FADE4 0x8C8C8C8C
      #define COLOR_FADE5 0x6E6E6E6E
      #define COLOR_PURPLE 0xC2A2DAAA
      #define COLOR_DBLUE 0x2641FEAA
      #define COLOR_ALLDEPT 0xFF8282AA
      #define COLOR_NEWS 0xFFA500AA
      #define COLOR_OOC 0xE0FFFFAA
      //New ´s
      //---------GATES---------//
      forward steffenherres3();


      new steffenherres1;


      //---------GATES---------//


      #pragma tabsize 0
      #if defined FILTERSCRIPT


      public OnFilterScriptInit()
      {//////////////SWAT STÜTZPUNKT
      CreateVehicle(427,1525.98608398,-1462.71569824,9.74800014,180.00000000,0,0,99999); //Enforcer
      CreateVehicle(427,1522.63366699,-1462.80895996,9.74800014,180.00000000,0,0,99999); //Enforcer
      CreateVehicle(427,1519.10998535,-1462.93261719,9.74800014,180.00000000,0,0,99999); //Enforcer
      CreateVehicle(427,1515.59985352,-1463.03833008,9.74800014,180.00000000,0,0,99999); //Enforcer
      CreateVehicle(427,1512.07824707,-1463.15661621,9.74800014,180.00000000,0,0,99999); //Enforcer
      CreateVehicle(490,1517.69995117,-1478.27368164,9.82012653,0.00000000,0,0,99999); //FBI Rancher
      CreateVehicle(598,1512.88574219,-1469.96594238,9.36999989,268.00000000,0,0,99999); //Police Car (LVPD)
      CreateVehicle(598,1512.83020020,-1472.99255371,9.36999989,268.00000000,0,0,99999); //Police Car (LVPD)
      steffenherres1 = CreateObject(10184,1532.63964844,-1451.36486816,14.80457497,0.00000000,0.00000000,270.00000000); //object(sfcopdr) (1)
      CreateObject(2921,1526.82995605,-1450.86718750,17.91459656,0.00000000,0.00000000,264.00000000); //object(kmb_cam) (1)
      CreateObject(2886,1529.29602051,-1451.17187500,15.37453079,0.00000000,0.00000000,180.00000000); //object(sec_keypad) (1)
      CreateObject(17950,1510.80358887,-1478.12854004,9.60067177,0.00000000,0.00000000,270.00000000); //object(cjsaveg) (1)
      CreateObject(974,1515.22802734,-1479.79187012,8.23774052,0.00000000,0.00000000,270.00000000); //object(tall_fence) (1)
      CreateObject(3393,1511.25732422,-1480.66821289,8.50000000,0.00000000,0.00000000,270.00000000); //object(a51_sdsk_ncol4_) (1)
      CreateObject(3787,1511.39953613,-1475.88110352,9.06623363,0.00000000,0.00000000,0.00000000); //object(missile_02_sfxr) (1)
      CreateObject(3797,1510.89172363,-1475.08911133,10.30202198,0.00000000,0.00000000,0.00000000); //object(missile_11_sfxr) (1)
      CreateObject(997,1527.27648926,-1481.44299316,8.50000000,0.00000000,0.00000000,90.00000000); //object(lhouse_barrier3) (1)
      CreateObject(997,1530.32617188,-1481.40625000,8.50000000,0.00000000,0.00000000,90.00000000); //object(lhouse_barrier3) (2)
      CreateObject(997,1533.12084961,-1481.41137695,8.50000000,0.00000000,0.00000000,90.00000000); //object(lhouse_barrier3) (3)
      CreateObject(997,1535.95996094,-1481.17041016,8.50000000,0.00000000,0.00000000,90.00000000); //object(lhouse_barrier3) (4)
      CreateObject(997,1535.95996094,-1481.16992188,8.50000000,0.00000000,0.00000000,90.00000000); //object(lhouse_barrier3) (5)
      CreateObject(997,1524.33923340,-1481.35205078,8.50000000,0.00000000,0.00000000,90.00000000); //object(lhouse_barrier3) (6)
      CreateObject(997,1521.34130859,-1481.32031250,8.50000000,0.00000000,0.00000000,90.00000000); //object(lhouse_barrier3) (7)


      /*-----Gates-----*/




      /*-----Gates-----*/



      print("\n--------------------------------------");
      print(" Army/Zoll/Swat Create by Leon (C) ");
      print("--------------------------------------\n");
      return 1;
      }


      #else
      #endif
      public OnPlayerCommandText(playerid, cmdtext[])
      {
      if(strcmp(cmdtext, "/armyswatzollhelp", true, 10) == 0)
      {
      SendClientMessage(playerid, COLOR_GREEN, "** **");
      return 1;
      }

      if(strcmp(cmdtext,"/spswat", true, 10) == 0)
      {
      MoveObject(steffenherres1,1532.63964844,-1451.36486816,24.80457497,4.5);
      SetTimer("steffenherres3",5000,0);
      return 1;
      }

      return 0;
      }


      public steffenherres3()
      {
      MoveObject(steffenherres1,1532.63964844,-1451.36486816,14.80457497,4.5);
      return 1;
      }



      //Ende


    //edit 1: das unnötige rausgenommen
    //edit 2: den edit reingeschrieben^^
    //edit 3:Habs Gefunden ^^ das return 0; muss an die andere Stelle.... So funktioniert es jetzt

    Einmal editiert, zuletzt von Möchtigern ()