Beiträge von lollipop

    Yoa hi,
    ich habe es entlich geschafft das LoH tacho für mich umzuschreiben ;D
    Jetzt aber 2 Probleme.
    Wenn ich das Auto verlasse bleibt das Tacho.
    Es sieht so aus:
    http://img130.imageshack.us/f/samp035g.png/
    und ich kriege ein error:
    [hide]C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14981) : warning 202: number of arguments does not match definition
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Warning.
    [/hide]
    Hier der ganze Code:
    forward IsANoTachoVehicle(carid);
    public IsANoTachoVehicle(carid)
    {
    new modelid = GetVehicleModel(carid);
    if(modelid == 509 || modelid == 481 || modelid == 510)
    {
    return 1;
    }
    return 0;
    }
    if(strcmp(cmd, "/fillcar", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    if(PlayerInfo[playerid][pFuel] > 0)
    {
    new veh = GetPlayerVehicleID(playerid);
    if(IsANoTachoVehicle(veh))
    {
    SendClientMessage(playerid,COLOR_YELLOW," Ein Fahrrad hat doch keinen Tank...");
    }
    else if( (Gas[veh] + 20) < GetGasMax(GetVehicleModel(veh)) )
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, " ~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fahrzeug tanken, bitte warten.");
    Gas[veh] += 20;
    PlayerInfo[playerid][pFuel] = 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Dein Fahrzeug hat noch genug Benzin !");
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Dein Benzinkanister ist leer !");
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist in keinem Fahrzeug !");
    }
    }
    return 1;
    }
    public VehStateCheck()
    {
    for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
    {
    if(IsPlayerConnected(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && !IsANoTachoVehicle(GetPlayerVehicleID(playerid)))
    {
    if(M_Bot[playerid][PAFK] == 0)
    {
    new Text:Tacho[MAX_PLAYERS];
    new Float:health,vehicleid = GetPlayerVehicleID(playerid),string[256],Float:value,Float:distance,Float:x,Float:y,Float:z;
    TextDrawHideForPlayer(playerid, Tacho[playerid]);
    GetPlayerPos(playerid, x, y, z);
    distance = floatsqroot(floatpower(floatabs(floatsub(x,PCarPos[playerid][PCarX])),2)+floatpower(floatabs(floatsub(y,PCarPos[playerid][PCarY])),2)+floatpower(floatabs(floatsub(z,PCarPos[playerid][PCarZ])),2));
    value = floatround(distance * 11000);
    GetVehicleHealth(vehicleid,health);
    if (health >= 0 && health <= 1000)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ %d~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),GetVehicleHealth(GetVehicleHealth(vehicleid,health)),VehicleName[GetVehicleModel(vehicleid)-400]); //Problemzeile mit error
    Tacho[playerid] = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho[playerid],0.299999,0.799999);
    TextDrawSetOutline(Tacho[playerid],1);
    TextDrawFont(Tacho[playerid],1);
    TextDrawSetProportional(Tacho[playerid],1);
    TextDrawAlignment(Tacho[playerid],0);
    TextDrawBackgroundColor(Tacho[playerid],0x000000ff);
    TextDrawColor(Tacho[playerid],0xffffffff);
    TextDrawSetShadow(Tacho[playerid],1);
    TextDrawShowForPlayer(playerid,Tacho[playerid]);
    }
    }
    }
    }
    return 1;
    }
    Am liebsten hätte ich es in ne Schwarzen box des aber nur nebenbei.
    Hoffe mir kann jemand helfen.
    mfg lolli


    //edit ich weis wo der error liegt aber nich wie ich ihn behebe.
    Die problemzeile ist ja die:
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ %d~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),GetVehicleHealth(GetVehicleHealth(vehicleid,health)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Seit ih das eingefügt habe kommt das error:
    GetVehicleHealth(GetVehicleHealth(vehicleid,health)),
    Das ich euch die suche erleichtere.
    ich weis echt nicht woran es liegt.
    Hoffe so findet ihr schneller den Fehler.
    mfg lolli
    P.S. das ist meine erste Textdraw und mein 1. Tacho also net über nehmen danke
    //edit etwas um geschrieben
    Und wenn man losfährt dann steigt die Km/h anzeigen udn wenn man stoppt bleibt sie dort gefreezt.
    Also alle bugs:
    Beim aussteigen wird es nicht enfernt
    KM/H verbuggt
    error

    Wenn man es falsch macht werden die Userdaten nicht gesaved beim disconnecten...
    dafür ist dieses Tuturial um den Bug zu beheben das ers imkmer gespeichert wird.
    mfg lolli
    Das tutorial ist so simple gbeschäftige dich mal damit 10min dann haste es verstanden ich weis nicht was du jez wissen willst.

    Ich habe des jetzt so:
    public VehStateCheck()
    {
    for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
    {
    if(IsPlayerConnected(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && !IsANoTachoVehicle(GetPlayerVehicleID(playerid)))
    {
    if(M_Bot[playerid][PAFK] == 0)
    {
    new Text:Tacho[MAX_PLAYERS]; //14973 OProblemzeile 1 1. errors
    new Float:health,vehicleid = GetPlayerVehicleID(playerid),string[256],Float:value,Float:distance,Float:x,Float:y,Float:z;
    TextDrawHideForPlayer(playerid, Tacho[playerid]); //14975 OProblemzeile 1 4. errors
    GetPlayerPos(playerid, x, y, z);
    distance = floatsqroot(floatpower(floatabs(floatsub(x,PCarPos[playerid][PCarX])),2)+floatpower(floatabs(floatsub(y,PCarPos[playerid][PCarY])),2)+floatpower(floatabs(floatsub(z,PCarPos[playerid][PCarZ])),2));
    value = floatround(distance * 11000);
    GetVehicleHealth(vehicleid,health);
    if (health >= 950 && health <= 1000)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ |||||||||~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho[playerid] = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho[playerid],0.299999,0.799999);
    TextDrawSetOutline(Tacho[playerid],1);
    TextDrawFont(Tacho[playerid],1);
    TextDrawSetProportional(Tacho[playerid],1);
    TextDrawAlignment(Tacho[playerid],0);
    TextDrawBackgroundColor(Tacho[playerid],0x000000ff);
    TextDrawColor(Tacho[playerid],0xffffffff);
    TextDrawSetShadow(Tacho[playerid],1);
    TextDrawShowForPlayer(playerid,Tacho[playerid]);
    }
    else if (health >= 900 && health <= 950)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ |||||||||~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho[playerid] = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho[playerid],0.299999,0.799999);
    TextDrawSetOutline(Tacho[playerid],1);
    TextDrawFont(Tacho[playerid],1);
    TextDrawSetProportional(Tacho[playerid],1);
    TextDrawAlignment(Tacho[playerid],0);
    TextDrawBackgroundColor(Tacho[playerid],0x000000ff);
    TextDrawColor(Tacho[playerid],0xffffffff);
    TextDrawSetShadow(Tacho[playerid],1);
    TextDrawShowForPlayer(playerid,Tacho[playerid]);
    }
    else if (health >= 700 && health <= 800)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ ||||||||~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho[playerid] = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho[playerid],0.299999,0.799999);
    TextDrawSetOutline(Tacho[playerid],1);
    TextDrawFont(Tacho[playerid],1);
    TextDrawSetProportional(Tacho[playerid],1);
    TextDrawAlignment(Tacho[playerid],0);
    TextDrawBackgroundColor(Tacho[playerid],0x000000ff);
    TextDrawColor(Tacho[playerid],0xffffffff);
    TextDrawSetShadow(Tacho[playerid],1);
    TextDrawShowForPlayer(playerid,Tacho[playerid]);
    }
    else if (health >= 600 && health <= 700)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ |||||||~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho[playerid] = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho[playerid],0.299999,0.799999);
    TextDrawSetOutline(Tacho[playerid],1);
    TextDrawFont(Tacho[playerid],1);
    TextDrawSetProportional(Tacho[playerid],1);
    TextDrawAlignment(Tacho[playerid],0);
    TextDrawBackgroundColor(Tacho[playerid],0x000000ff);
    TextDrawColor(Tacho[playerid],0xffffffff);
    TextDrawSetShadow(Tacho[playerid],1);
    TextDrawShowForPlayer(playerid,Tacho[playerid]);
    }
    else if (health >= 500 && health <= 600)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ ||||||~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho[playerid] = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho[playerid],0.299999,0.799999);
    TextDrawSetOutline(Tacho[playerid],1);
    TextDrawFont(Tacho[playerid],1);
    TextDrawSetProportional(Tacho[playerid],1);
    TextDrawAlignment(Tacho[playerid],0);
    TextDrawBackgroundColor(Tacho[playerid],0x000000ff);
    TextDrawColor(Tacho[playerid],0xffffffff);
    TextDrawSetShadow(Tacho[playerid],1);
    TextDrawShowForPlayer(playerid,Tacho[playerid]);
    }
    else if (health >= 400 && health <= 500)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ |||||~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho[playerid] = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho[playerid],0.299999,0.799999);
    TextDrawSetOutline(Tacho[playerid],1);
    TextDrawFont(Tacho[playerid],1);
    TextDrawSetProportional(Tacho[playerid],1);
    TextDrawAlignment(Tacho[playerid],0);
    TextDrawBackgroundColor(Tacho[playerid],0x000000ff);
    TextDrawColor(Tacho[playerid],0xffffffff);
    TextDrawSetShadow(Tacho[playerid],1);
    TextDrawShowForPlayer(playerid,Tacho[playerid]);
    }
    else if (health >= 300 && health <= 400)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ ||||~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho[playerid] = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho[playerid],0.299999,0.799999);
    TextDrawSetOutline(Tacho[playerid],1);
    TextDrawFont(Tacho[playerid],1);
    TextDrawSetProportional(Tacho[playerid],1);
    TextDrawAlignment(Tacho[playerid],0);
    TextDrawBackgroundColor(Tacho[playerid],0x000000ff);
    TextDrawColor(Tacho[playerid],0xffffffff);
    TextDrawSetShadow(Tacho[playerid],1);
    TextDrawShowForPlayer(playerid,Tacho[playerid]);
    }
    else if (health >= 200 && health <= 300)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ |||~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho[playerid] = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho[playerid],0.299999,0.799999);
    TextDrawSetOutline(Tacho[playerid],1);
    TextDrawFont(Tacho[playerid],1);
    TextDrawSetProportional(Tacho[playerid],1);
    TextDrawAlignment(Tacho[playerid],0);
    TextDrawBackgroundColor(Tacho[playerid],0x000000ff);
    TextDrawColor(Tacho[playerid],0xffffffff);
    TextDrawSetShadow(Tacho[playerid],1);
    TextDrawShowForPlayer(playerid,Tacho[playerid]);
    }
    else if (health >= 100 && health <= 200)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ ||~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho[playerid] = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho[playerid],0.299999,0.799999);
    TextDrawSetOutline(Tacho[playerid],1);
    TextDrawFont(Tacho[playerid],1);
    TextDrawSetProportional(Tacho[playerid],1);
    TextDrawAlignment(Tacho[playerid],0);
    TextDrawBackgroundColor(Tacho[playerid],0x000000ff);
    TextDrawColor(Tacho[playerid],0xffffffff);
    TextDrawSetShadow(Tacho[playerid],1);
    TextDrawShowForPlayer(playerid,Tacho[playerid]);
    }
    else if (health >= 0 && health <= 100)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ |~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho[playerid] = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho[playerid],0.299999,0.799999);
    TextDrawSetOutline(Tacho[playerid],1);
    TextDrawFont(Tacho[playerid],1);
    TextDrawSetProportional(Tacho[playerid],1);
    TextDrawAlignment(Tacho[playerid],0);
    TextDrawBackgroundColor(Tacho[playerid],0x000000ff);
    TextDrawColor(Tacho[playerid],0xffffffff);
    TextDrawSetShadow(Tacho[playerid],1);
    TextDrawShowForPlayer(playerid,Tacho[playerid]);
    }
    }
    }
    }
    return 1;
    }
    Jedoch habe ich immernoch 5 errors:
    [hide]C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14973) : error 001: expected token: "-identifier-", but found "["
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14975) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14975) : warning 215: expression has no effect
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14975) : error 001: expected token: ";", but found "]"
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14975) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14975) : fatal error 107: too many error messages on one line


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



    5 Errors.
    [/hide]
    //edit paar errors rausbekommen komplett neu geschrieben

    Bei uns ist des so das die Eltern/ Beziehungsberwechtigten es aholen müssen egal was für ein elektronisches Gerät es ist.
    Nicht bei der Schulleitung sondern bei dem entsprechenden Lehrer.
    Anzeige sinnloss der Lehrerr darf es weggnehmen.

    [hide]C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(435) : error 020: invalid symbol name ""
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14975) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14975) : error 035: argument type mismatch (argument 2)
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14984) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14985) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14985) : warning 215: expression has no effect
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14985) : warning 215: expression has no effect
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14985) : error 001: expected token: ";", but found ")"
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14985) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14985) : fatal error 107: too many error messages on one line


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



    8 Errors.
    [/hide]
    new Text:Tacho[MAX_PLAYERS];//435 Problemzeile
    public VehStateCheck()
    {
    for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
    {
    if(IsPlayerConnected(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && !IsANoTachoVehicle(GetPlayerVehicleID(playerid)))
    {
    if(M_Bot[playerid][PAFK] == 0)
    {
    TextDrawHideForPlayer(playerid, Tacho); //14975 Problemzeile
    new Float:health,vehicleid = GetPlayerVehicleID(playerid),string[256],Float:value,Float:distance,Float:x,Float:y,Float:z;
    GetPlayerPos(playerid, x, y, z);
    distance = floatsqroot(floatpower(floatabs(floatsub(x,PCarPos[playerid][PCarX])),2)+floatpower(floatabs(floatsub(y,PCarPos[playerid][PCarY])),2)+floatpower(floatabs(floatsub(z,PCarPos[playerid][PCarZ])),2));
    value = floatround(distance * 11000);
    GetVehicleHealth(vehicleid,health);
    if (health >= 900 && health <= 1000)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ ========~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho,0.299999,0.799999); //14985 Problemzeile
    TextDrawSetOutline(Tacho,1);
    TextDrawFont(Tacho,1);
    TextDrawSetProportional(Tacho,1);
    TextDrawAlignment(Tacho,0);
    TextDrawBackgroundColor(Tacho,0x000000ff);
    TextDrawColor(Tacho,0xffffffff);
    TextDrawSetShadow(Tacho,1);
    TextDrawShowForPlayer(playerid,Tacho);
    }
    }
    }
    }
    return 1;
    }


    mfg lolli

    weiterhin 7 errors:


    [hide]C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14974) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14974) : error 035: argument type mismatch (argument 2)
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14983) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14984) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14984) : warning 215: expression has no effect
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14984) : warning 215: expression has no effect
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14984) : error 001: expected token: ";", but found ")"
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14984) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14984) : fatal error 107: too many error messages on one line


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



    7 Errors.
    [/hide]


    public VehStateCheck()
    {
    for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
    {
    if(IsPlayerConnected(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && !IsANoTachoVehicle(GetPlayerVehicleID(playerid)))
    {
    if(M_Bot[playerid][PAFK] == 0)
    {
    TextDrawHideForPlayer(playerid, Tacho); //14974 Problemzeile
    new Float:health,vehicleid = GetPlayerVehicleID(playerid),string[256],Float:value,Float:distance,Float:x,Float:y,Float:z;
    GetPlayerPos(playerid, x, y, z);
    distance = floatsqroot(floatpower(floatabs(floatsub(x,PCarPos[playerid][PCarX])),2)+floatpower(floatabs(floatsub(y,PCarPos[playerid][PCarY])),2)+floatpower(floatabs(floatsub(z,PCarPos[playerid][PCarZ])),2));
    value = floatround(distance * 11000);
    GetVehicleHealth(vehicleid,health);
    if (health >= 900 && health <= 1000)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ ========~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho,0.299999,0.799999); //14984 Problemzeile
    TextDrawSetOutline(Tacho,1);
    TextDrawFont(Tacho,1);
    TextDrawSetProportional(Tacho,1);
    TextDrawAlignment(Tacho,0);
    TextDrawBackgroundColor(Tacho,0x000000ff);
    TextDrawColor(Tacho,0xffffffff);
    TextDrawSetShadow(Tacho,1);
    TextDrawShowForPlayer(playerid,Tacho);
    }
    }
    }
    }
    return 1;
    }
    Danke an Dudalus aber es bleiben weiterhin errors.
    mfg lolli

    Yoa hi,
    ich habe mich ma an nem Tacho versucht.
    Ich kriege aber 9 errors:
    [hide]C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(3758) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(3758) : error 035: argument type mismatch (argument 2)
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14974) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14974) : error 035: argument type mismatch (argument 2)
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14984) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14985) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14985) : warning 215: expression has no effect
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14985) : warning 215: expression has no effect
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14985) : error 001: expected token: ";", but found ")"
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14985) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(14985) : fatal error 107: too many error messages on one line


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



    9 Errors.[/hide]
    Hier das ganze Tacho:
    TextDrawShowForPlayer(playerid,Tacho);
    for(new i = 0; i < 700; i++)
    {
    if(Dtc_Carlock[i])
    {
    SetVehicleParamsForPlayer(playerid,playerid,0,1); //3786 Problemzeile
    }
    }
    public VehStateCheck()
    {
    for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
    {
    if(IsPlayerConnected(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && !IsANoTachoVehicle(GetPlayerVehicleID(playerid)))
    {
    if(M_Bot[playerid][PAFK] == 0)
    TextDrawHideForPlayer(playerid, Tacho); //14974 Problemzeile
    {
    new Float:health,vehicleid = GetPlayerVehicleID(playerid),string[256],Float:value,Float:distance,Float:x,Float:y,Float:z;
    GetPlayerPos(playerid, x, y, z);
    distance = floatsqroot(floatpower(floatabs(floatsub(x,PCarPos[playerid][PCarX])),2)+floatpower(floatabs(floatsub(y,PCarPos[playerid][PCarY])),2)+floatpower(floatabs(floatsub(z,PCarPos[playerid][PCarZ])),2));
    value = floatround(distance * 11000);
    GetVehicleHealth(vehicleid,health);
    if (health >= 900 && health <= 1000)
    {
    format(string, sizeof(string), "~w~Geschwindigkeit: %d~w~ KM/H~n~Tankinhalt: ~w~%d ~b~/~w~ %d~w~~n~Zustand:~g~ ========~n~~w~Fahrzeug: ~w~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    Tacho = TextDrawCreate(490.000000,401.000000,string);
    TextDrawLetterSize(Tacho,0.299999,0.799999); //14985 Problemzeile
    TextDrawSetOutline(Tacho,1);
    TextDrawFont(Tacho,1);
    TextDrawSetProportional(Tacho,1);
    TextDrawAlignment(Tacho,0);
    TextDrawBackgroundColor(Tacho,0x000000ff);
    TextDrawColor(Tacho,0xffffffff);
    TextDrawSetShadow(Tacho,1);
    TextDrawShowForPlayer(playerid,Tacho);
    }
    }
    }
    }
    return 1;
    }


    Hoffe mir kann da jemand helfen.
    Ich weis einfach nicht mehr weiter
    mfg lolli


    //edit Überschrift

    Yoa hi,
    ich wollte heute morgen meine Object convertieren.
    Jez wenn ich auf convertffs.com gehe ist da so ein fenster mit convert to avi und sonstwas.
    Ist convertffs.com dwn oder hat den anbierter gewechselt?
    Wenns der falsche Bereich ist bitte löschen oder verschieben.
    Was ist mit convertffs.com los?

    Danke Rotten apple


    //edit rest gelöscht bei roten apple bedankt geht wunderbar


    //edit 2 Das Object wird nicht zerstört also mann kann die Sirene nicht deaktivieren.
    Hier der Code von Rottenapple nur ein wenig verändert:
    if(strcmp(cmdtext, "/Sirene", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsACop(playerid) || IsPlayerInFrac(playerid,4) || IsAFbi(playerid))
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    sirene[vehicleid] = CreateObject(18646, 0, 0, 0, 0, 0, 0, 0);
    AttachObjectToVehicle(sirene[vehicleid], vehicleid, 0-0.5, 0, 0+0.68, 0, 0, 0);
    GameTextForPlayer(playerid,"~r~Sirene Aktiviert",5000, 1);
    SendClientMessage(playerid, COLOR_GREY, "Du kannst die Sirene mit erneutem eingeben von /sirene wieder ausschalten!");
    return 1;
    }
    else
    {
    GameTextForPlayer(playerid,"~r~Sirene Deaktiviert",5000, 1);
    SendClientMessage(playerid, COLOR_GREY, "Du kannst die Sirene mit erneutem eingeben von /sirene wieder einschalten!");
    DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
    }
    }
    return 1;
    }
    Keine errors aber sirene wird nicht entfernt

    [hide]C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16777) : error 033: array must be indexed (variable "sirene")
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16778) : error 035: argument type mismatch (argument 1)
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16785) : error 017: undefined symbol "sirene"
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16785) : error 001: expected token: ";", but found "]"
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16785) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16785) : fatal error 107: too many error messages on one line


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



    6 Errors.
    [/hide]
    if(strcmp(cmdtext, "/Sirene", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsACop(playerid) || IsPlayerInFrac(playerid,4) || IsAFbi(playerid))
    {
    new sirene[MAX_VEHICLES];
    new vehicleid = GetPlayerVehicleID(playerid);
    sirene = CreateObject(18646, 0, 0, 0, 0, 0, 0, 0); //16777
    AttachObjectToVehicle(sirene, vehicleid, 0-0.5, 0, 0+0.68, 0, 0, 0);
    GameTextForPlayer(playerid,"~r~Sirene Aktiviert",5000, 1);
    SendClientMessage(playerid, COLOR_GREY, "Du kannst die Sirene mit erneutem eingeben von /sirene wieder ausschalten!");
    return 1;
    }
    else
    {
    DestroyObject(sirene[GetPlayerVehicleID(playerid)]); //1685
    }
    }
    return 1;
    }
    Von 4 errors auf 6 umgestiegen ;D

    Yoa guten morgen.
    ich habe jez ne Sirene eingebaut in mein Script.
    Jez kriege ich aber 4 errors:
    [hide]C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16785) : error 017: undefined symbol "sirene"
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16785) : error 001: expected token: ";", but found "]"
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16785) : error 029: invalid expression, assumed zero
    C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16785) : 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.
    [/hide]


    Hier der Code:
    if(strcmp(cmdtext, "/Sirene", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsACop(playerid) || IsPlayerInFrac(playerid,4) || IsAFbi(playerid))
    {
    new sirene;
    new vehicleid = GetPlayerVehicleID(playerid);
    sirene = CreateObject(18646, 0, 0, 0, 0, 0, 0, 0);
    AttachObjectToVehicle(sirene, vehicleid, 0-0.5, 0, 0+0.68, 0, 0, 0);
    GameTextForPlayer(playerid,"~r~Sirene Aktiviert",5000, 1);
    SendClientMessage(playerid, COLOR_GREY, "Du kannst die Sirene mit erneutem eingeben von /sirene wieder ausschalten!");
    return 1;
    }
    else
    {
    DestroyObject(sirene[GetPlayerVehicleID(playerid)]); //problemzeile
    }
    }
    return 1;
    }


    Hoffe jemand weis wo der Fehler liegt.
    mfg lolli

    nicht so shcöne Idee jedoch mache die Command lieber auf /afk und /back.
    Dann würde ich dir noch empfehlen es anzeigen zu lassen wer afk ist also mit /afkliste währe vion Vorteil.
    Idee 3/10 gibt schon sehr viele
    umsetztung 5/10 geht besser
    mfg lolli

    Ich habe das bei OnGameModeInit:
    ManualVehicleEngineAndLights();
    Brauche ich des trotzdem in der abfrage also:
    if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)
    ?


    //edit danke Snail funct alles wunderbar. Also hat sich erledigt
    mfg lolli