Tacho 4 Error

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, hier die Errors :
    C:\Users\Brandon\Desktop\[Ger]Your Second Familie[0.3x]\gamemodes\Familie.pwn(435) : error 017: undefined symbol "X1"
    C:\Users\Brandon\Desktop\[Ger]Your Second Familie[0.3x]\gamemodes\Familie.pwn(435) : warning 215: expression has no effect
    C:\Users\Brandon\Desktop\[Ger]Your Second Familie[0.3x]\gamemodes\Familie.pwn(435) : error 001: expected token: ";", but found "]"
    C:\Users\Brandon\Desktop\[Ger]Your Second Familie[0.3x]\gamemodes\Familie.pwn(435) : error 029: invalid expression, assumed zero
    C:\Users\Brandon\Desktop\[Ger]Your Second Familie[0.3x]\gamemodes\Familie.pwn(435) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.


    Script :


    public UpdateTacho()
    {
    for(new i = 0;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER && !IsPlayerNPC(i))
    {
    new Float:Strecke,Float:Geschwindigkeit;
    GetVehiclePos(GetPlayerVehicleID(i),X1[i],Y1[i],Z1[i]);//Zeile 435
    Strecke = floatsqroot(floatpower(floatabs(floatsub(X1[i],X2[i])),2)+floatpower(floatabs(floatsub(Y1[i],Y2[i])),2)+floatpower(floatabs(floatsub(Z1[i],Z2[i])),2));
    Geschwindigkeit = (Strecke / (TACHOTIMER/1000)) * 3.6;
    new String[50];
    format(String,50,"Mein Tacho.\nGeschwindigkeit: %d km/h",floatround(Geschwindigkeit));
    TextDrawSetString(Tacho[i],String);
    GetVehiclePos(GetPlayerVehicleID(i),X2[i],Y2[i],Z2[i]);
    TextDrawShowForPlayer(i,Tacho[i]);
    }
    else
    {
    TextDrawHideForPlayer(i,Tacho[i]);
    }
    }
    return 1;
    }

  • C:\Users\Brandon\Desktop\[Ger]Your Second Familie[0.3x]\gamemodes\Familie.pwn(437) : error 028: invalid subscript (not an array or too many subscripts): "X1"
    C:\Users\Brandon\Desktop\[Ger]Your Second Familie[0.3x]\gamemodes\Familie.pwn(437) : warning 215: expression has no effect
    C:\Users\Brandon\Desktop\[Ger]Your Second Familie[0.3x]\gamemodes\Familie.pwn(437) : error 001: expected token: ";", but found "]"
    C:\Users\Brandon\Desktop\[Ger]Your Second Familie[0.3x]\gamemodes\Familie.pwn(437) : error 029: invalid expression, assumed zero
    C:\Users\Brandon\Desktop\[Ger]Your Second Familie[0.3x]\gamemodes\Familie.pwn(437) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.



    public UpdateTacho()
    {
    for(new i = 0;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER && !IsPlayerNPC(i))
    {
    new Float:Strecke,Float:Geschwindigkeit;
    new Float:X1, Float:Y1, Float:Z1;
    GetVehiclePos(GetPlayerVehicleID(i),X1,Y1,Z1);
    Strecke = floatsqroot(floatpower(floatabs(floatsub(X1[i],X2[i])),2)+floatpower(floatabs(floatsub(Y1[i],Y2[i])),2)+floatpower(floatabs(floatsub(Z1[i],Z2[i])),2));//Zeile 437
    Geschwindigkeit = (Strecke / (TACHOTIMER/1000)) * 3.6;
    new String[50];
    format(String,50,"Mein Tacho.\nGeschwindigkeit: %d km/h",floatround(Geschwindigkeit));
    TextDrawSetString(Tacho[i],String);
    GetVehiclePos(GetPlayerVehicleID(i),X2[i],Y2[i],Z2[i]);
    TextDrawShowForPlayer(i,Tacho[i]);
    }
    else
    {
    TextDrawHideForPlayer(i,Tacho[i]);
    }
    }
    return 1;
    }