/flock Abfrage fehler

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 zusammen,


    im Auftrag des 4RL Scripter Teams stelle ich hier mal eine Hilfeanfrage (nein kein Multiaccount, ich bin Moderator)


    also wir haben einen /flock Befehl geschrieben, welcher ja das Fahrzeug abschließt. Wie im Beitrag vom Kollegen [4RL]Shot-Boom
    soll man das Fahrzeug nur als Member/ Leader abschlißen können.


    Dies soll nicht nur dem Realismus dienen sondern auch dem job dieb


    hier habe ich mal den kompletten befehl


    Spoiler anzeigen

    ocmd:flock(playerid,params[])
    {
    if(IsPlayerConnected(playerid))
    {
    new leader = sInfo[playerid][pLeader];
    new member = sInfo[playerid][pMember];
    if(leader == 1 || leader == 2 || leader == 3 || leader == 4 || leader == 5 || leader = 6 || leader == 7 || leader == 8 || leader == 9 || leader == 10;
    {
    if(IsPlayerInVehicle(playerid,fc_id))
    {
    new engine,lights,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(SupCar[playerid],engine,lights,alarm,doors,bonnet,boot,objective);
    if(FrakcarKey[playerid] == 0)
    {
    GameTextForPlayer(playerid, "~b~Fraktionsauto ~g~aufgeschlossen", 5000, 6);
    SetVehicleParamsEx(SupCar[playerid],engine,lights,alarm,VEHICLE_PARAMS_OFF,bonnet,boot,objective);
    FrakcarKey[playerid] = 1;
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
    }
    else if(FrakcarKey[playerid] == 1)
    {
    GameTextForPlayer(playerid, "~b~Fraktionsauto ~r~abgeschlossen", 5000, 6);
    SetVehicleParamsEx(SupCar[playerid],engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
    FrakcarKey[playerid] = 0;
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
    }
    }
    else return SendClientMessage(playerid,RED,"Du bist kein Leader einer Fraktion!");
    }
    if(member == 1 || member == 2 || member == 3 || member == 4 || member == 5 || member = 6 || member == 7 || member == 8 || member == 9 || member == 10)
    {
    if(IsPlayerInVehicle(playerid,fc_id))
    {
    new engine,lights,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(SupCar[playerid],engine,lights,alarm,doors,bonnet,boot,objective);
    if(FrakcarKey[playerid] == 0)
    {
    GameTextForPlayer(playerid, "~b~Fraktionsauto ~g~aufgeschlossen", 5000, 6);
    SetVehicleParamsEx(SupCar[playerid],engine,lights,alarm,VEHICLE_PARAMS_OFF,bonnet,boot,objective);
    FrakcarKey[playerid] = 1;
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
    }
    else if(FrakcarKey[playerid] == 1)
    {
    GameTextForPlayer(playerid, "~b~Fraktionsauto ~r~abgeschlossen", 5000, 6);
    SetVehicleParamsEx(SupCar[playerid],engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
    FrakcarKey[playerid] = 0;
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
    }
    }
    else return SendClientMessage(playerid,ROT,"Du bist kein Member einer Fraktion!");
    }
    }
    else
    {
    SendClientMessage(playerid,RED,"Du bist nicht eingeloggt!");
    }
    return 1;
    }



    und hier die problemzeilen mit den entsprechenden errors



    Zeile 1if(leader == 1 || leader == 2 || leader == 3 || leader == 4 || leader == 5 || leader = 6 || leader == 7 || leader == 8 || leader == 9 || leader == 10;



    Mit diesen Errors


    E:\SAMP\gamemodes\Script1.pwn(7365) : warning 211: possibly unintended assignment
    E:\SAMP\gamemodes\Script1.pwn(7365) : error 022: must be lvalue (non-constant)
    E:\SAMP\gamemodes\Script1.pwn(7365) : warning 215: expression has no effect



    und diese Zeile


    Zeile 2
    if(member == 1 || member == 2 || member == 3 || member == 4 || member == 5 || member = 6 || member == 7 || member == 8 || member == 9 || member == 10)



    Mit diesen Errors


    E:\SAMP\gamemodes\Script1.pwn(7388) : warning 211: possibly unintended assignment
    E:\SAMP\gamemodes\Script1.pwn(7388) : error 022: must be lvalue (non-constant)
    E:\SAMP\gamemodes\Script1.pwn(7388) : warning 215: expression has no effect
    E:\SAMP\gamemodes\Script1.pwn(7388) : error 001: expected token: ";", but found ")"
    E:\SAMP\gamemodes\Script1.pwn(7388) : error 029: invalid expression, assumed zero
    E:\SAMP\gamemodes\Script1.pwn(7388) : fatal error 107: too many error messages on one line




    Ich bin dankbar für jede Hilfe

  • habe die Klammer hinzugefügt



    Folgende Errors sind verbleibend


    E:\SAMP\gamemodes\Script1.pwn(7365) : warning 211: possibly unintended assignment
    E:\SAMP\gamemodes\Script1.pwn(7365) : error 022: must be lvalue (non-constant)
    E:\SAMP\gamemodes\Script1.pwn(7365) : warning 215: expression has no effect
    E:\SAMP\gamemodes\Script1.pwn(7365) : error 001: expected token: ";", but found ")"
    E:\SAMP\gamemodes\Script1.pwn(7365) : error 029: invalid expression, assumed zero
    E:\SAMP\gamemodes\Script1.pwn(7365) : 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.




    in der Zeile mit der Leaderabfrage