4 Errors ? hilfe

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
    • S:\GTA San Andreas + server\Server\gamemodes\Script.pwn(11522) : error 017: undefined symbol "GetVehicleSpeed_P"
      S:\GTA San Andreas + server\Server\gamemodes\Script.pwn(11533) : error 021: symbol already defined: "speed"
      S:\GTA San Andreas + server\Server\gamemodes\Script.pwn(11522) : warning 204: symbol is assigned a value that is never used: "speed"
      S:\GTA San Andreas + server\Server\gamemodes\Script.pwn(11521) : warning 204: symbol is assigned a value that is never used


    • public UpdateSpeed()
      {
      //new Float:x, Float:y, Float:z;
      new string[256];
      for(new i=0;i<MAX_PLAYERS;i++)
      {
      if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
      {
      new const vehicleid = GetPlayerVehicleID(i);
      new Vehicle = GetPlayerVehicleID(i); // zeile 11521
      new Float:speed = GetVehicleSpeed_P(i); // zeile 11522
      new Float:memory[3]={0.00,0.00,0.00 };
      new Float:CarHealth;
      GetVehicleHealth(vehicleid, CarHealth);
      CarHealth = CarHealth -250;
      CarHealth = CarHealth/10;
      CarHealth = CarHealth /75;
      CarHealth = CarHealth *100;
      new CarHealthIni =floatround(CarHealth, floatround_floor);
      if(CarHealthIni < 0){ CarHealthIni = 0;}
      GetVehicleVelocity(vehicleid, memory[0], memory[1], memory[2]);
      new speed = speed/2; //zeile 11533
      format(string, sizeof(string), "%d km/h", floatround(speed));
      TextDrawSetString(Speedo5[i], string);
      new model = GetVehicleModel(GetPlayerVehicleID(i));
      if(!IsAFahrrad(model))
      {
      format(string, sizeof(string), "%d/%d", gGas[vehicleid], gMaxGas[vehicleid]);
      TextDrawSetString(Speedo6[i], string);
      }
      else
      {
      format(string, sizeof(string), "--/--");
      TextDrawSetString(Speedo6[i], string);
      }
      format(string, sizeof(string), "%d\%", CarHealthIni);
      TextDrawSetString(Speedo7[i], string);
      format(string, sizeof(string), "%s", CarName[model-400]);
      TextDrawSetString(Speedo4[i], string);



      }


      }


      }


    Brauche hilfe Bitte


    MFG

  • Die Funktion war in meinem Script schon Standardmäßig enthalten, das heißt also du hast diese gelöscht.


    stock Float:GetVehicleVelocityX(vehicleid){new Float:velocity_X, Float:velocity_dump_Y, Float:velocity_dump_Z;GetVehicleVelocity(vehicleid, velocity_X, velocity_dump_Y, velocity_dump_Z);velocity_dump_Y = 0.00;velocity_dump_Z = 0.00;return velocity_X;}
    stock Float:GetVehicleVelocityY(vehicleid){new Float:velocity_dump_X, Float:velocity_Y, Float:velocity_dump_Z;GetVehicleVelocity(vehicleid, velocity_dump_X, velocity_Y, velocity_dump_Z);velocity_dump_X = 0.00;velocity_dump_Z = 0.00;return velocity_Y;}
    stock Float:GetVehicleVelocityZ(vehicleid){new Float:velocity_dump_X, Float:velocity_dump_Y, Float:velocity_Z;GetVehicleVelocity(vehicleid, velocity_dump_X, velocity_dump_Y, velocity_Z);velocity_dump_X = 0.00;velocity_dump_Y = 0.00;return velocity_Z;}



    #define GetVehicleSpeed_P(%0) floatmul(floatsqroot(floatadd(floatpower(GetVehicleVelocityX(GetPlayerVehicleID(%0)), 2), floatadd(floatpower(GetVehicleVelocityY(GetPlayerVehicleID(%0)), 2), floatpower(GetVehicleVelocityZ(GetPlayerVehicleID(%0)), 2)))), 200)


    ...