Motor / Licht befehl funktioniert nicht?

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. Kriege bei meinem Motor / Licht system errors...


    Errors:

    Spoiler anzeigen
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15200) : warning 217: loose indentation
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15200) : error 017: undefined symbol "tmp_engine"
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15200 -- 15206) : warning 215: expression has no effect
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15208) : warning 217: loose indentation
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15208) : error 017: undefined symbol "tmp_engine"
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15209) : error 017: undefined symbol "tmp_engine"
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15210) : error 017: undefined symbol "tmp_engine"
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15210) : warning 215: expression has no effect
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15212) : error 017: undefined symbol "tmp_engine"
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15212) : warning 215: expression has no effect
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15214) : error 017: undefined symbol "tmp_engine"
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15223) : warning 217: loose indentation
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15223) : error 017: undefined symbol "tmp_engine"
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15223 -- 15229) : warning 215: expression has no effect
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15231) : warning 217: loose indentation
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15231) : error 017: undefined symbol "tmp_engine"
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15232) : error 017: undefined symbol "tmp_lights"
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15233) : error 017: undefined symbol "tmp_lights"
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15233) : warning 215: expression has no effect
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15235) : error 017: undefined symbol "tmp_lights"
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15235) : warning 215: expression has no effect
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(15237) : error 017: undefined symbol "tmp_engine"
    C:\Users\Yozhi.Rap\Documents\00!A Server SAMP\Server\gamemodes\gfl.pwn(42736) : warning 203: symbol is never used: "M_OnPlayerStateChange"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

    Spoiler anzeigen
    12 Errors.


    Befehle:
    Motor:

    Spoiler anzeigen
    if(!strcmp(cmd,"/motor",true))
    {
    if(GetPlayerState(playerid)!=PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_RED,"Du bist in keinem Fahrzeug.");

    Spoiler anzeigen
    new mvID=GetPlayerVehicleID(playerid);
    tmp_engine,
    tmp_lights,
    tmp_alarm,
    tmp_doors,
    tmp_bonnet,
    tmp_boot,
    tmp_objective;
    //Motor an befehl
    GetVehicleParamsEx(mvID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
    if(tmp_engine==1){
    tmp_engine = 0;
    }else{
    tmp_engine = 1;
    }
    SetVehicleParamsEx(mvID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
    return 1;
    }


    Licht:

    Spoiler anzeigen
    if(!strcmp(cmd,"/licht",true))
    {
    if(GetPlayerState(playerid)!=PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_RED,"Du bist in keinem Fahrzeug.");

    Spoiler anzeigen
    new mvID=GetPlayerVehicleID(playerid);
    tmp_engine,
    tmp_lights,
    tmp_alarm,
    tmp_doors,
    tmp_bonnet,
    tmp_boot,
    tmp_objective;
    //Motor an befehl
    GetVehicleParamsEx(mvID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
    if(tmp_lights==1){
    tmp_lights = 0;
    }else{
    tmp_lights = 1;
    }
    SetVehicleParamsEx(mvID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
    return 1;
    }



    Ich weiss nicht mehr weiter..


    MFG

  • if(!strcmp(cmd,"/motor",true))
    {
    if(GetPlayerState(playerid)!=PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_RED,"Du bist in keinem Fahrzeug.");
    new mvID=GetPlayerVehicleID(playerid),tmp_engine,tmp_lights,tmp_alarm,tmp_doors,tmp_bonnet,tmp_boot,tmp_objective;
    //Motor an befehl
    GetVehicleParamsEx(mvID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
    if(tmp_engine==1){
    tmp_engine = 0;
    }else{
    tmp_engine = 1;
    }
    SetVehicleParamsEx(mvID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
    return 1;
    }

    if(!strcmp(cmd,"/licht",true))
    {
    if(GetPlayerState(playerid)!=PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_RED,"Du bist in keinem Fahrzeug.");
    new mvID=GetPlayerVehicleID(playerid),tmp_engine,tmp_lights,tmp_alarm,tmp_doors,tmp_bonnet,tmp_boot,tmp_objective;
    //Motor an befehl
    GetVehicleParamsEx(mvID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
    if(tmp_lights==1){
    tmp_lights = 0;
    }else{
    tmp_lights = 1;
    }
    SetVehicleParamsEx(mvID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective);
    return 1;
    }


    Du hast zwischen GetPlayerVehicleID(playerid) und tmp_engine ein Semikolon anstatt ein Komma.


    Mencent 8)


  • Geht jetzt danke!
    Das es immer so kleine fehler sind die soviel kaputt machen :o :D


    MFG