Warnung...

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
  • Guten Tag,


    Bin grade dabei die SAPD Fahrzeuge zu machen.
    Nun habe ich aber Warnings bei allen Fahrzeugen.


    Hier:


    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(58) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(59) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(60) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(61) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(62) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(63) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(64) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(65) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(66) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(67) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(68) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(69) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(70) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(71) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(72) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(73) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(74) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(75) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(76) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(77) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(78) : warning 202: number of arguments does not match definition
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(79) : warning 202: number of arguments does not match definition


    Die ganzen definierungen.


    Nr 1:


    new SAPDFahrzeuge[22];


    Nr. 2


    forward SAPDFahrzeug(vehicleid);
    public SAPDFahrzeug(vehicleid)
    {
    for(new i = 0; i < sizeof(SAPDFahrzeuge); i++)
    {
    if(vehicleid== SAPDFahrzeuge[i])
    {
    return 1;
    }
    }
    return 0;
    }


    Dann habe ich noch ein Problem mit dem RemovePlayerFromVehicle hier der Code:


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    if(GetPlayerVehicleID(playerid) == SAPDFahrzeug(vehicleid)
    {
    if(!isPlayerInFrakt(playerid,1))return SendClientMessage(playerid,Grau,"Du bist kein Beamter.");
    {
    SendClientMessage(playerid,Grau,"Du bist kein Beamter");
    RemovePlayerFromVehicle(playerid);
    }
    }
    }
    return 1;
    }


    Der Error:


    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(375) : error 017: undefined symbol "vehicleid"


    Hoffe jemand kann schnell helfen :s



    Gruß

  • Hier die Fahrzeug Codes:


    SAPDFahrzeuge[0] = AddStaticVehicleEx(596,1530.1498,-1687.7977,5.6124,270.8958,53,1); // SAPD Car 1
    SAPDFahrzeuge[1] = AddStaticVehicleEx(596,1530.2432,-1683.8370,5.6118,268.2285,53,1); // SAPD Car 2
    SAPDFahrzeuge[2] = AddStaticVehicleEx(596,1543.7405,-1684.2646,5.6121,90.6348,53,1); // SAPD Car 3
    SAPDFahrzeuge[3] = AddStaticVehicleEx(596,1570.3419,-1709.4659,5.6122,1.4977,53,1); // SAPD Car 4
    SAPDFahrzeuge[4] = AddStaticVehicleEx(596,1574.5609,-1709.2969,5.6109,1.1584,53,1); // Sapd Car 5
    SAPDFahrzeuge[5] = AddStaticVehicleEx(596,1578.5197,-1709.5021,5.6110,359.8408,53,1); // SAPd Car 6
    SAPDFahrzeuge[6] = AddStaticVehicleEx(596,1583.4895,-1709.2991,5.6121,359.1800,53,1); // SAPD CAR 7
    SAPDFahrzeuge[7] = AddStaticVehicleEx(596,1587.4734,-1709.4283,5.6115,0.5649,53,1); // SAPD CAR 8
    SAPDFahrzeuge[8] = AddStaticVehicleEx(596,1591.5881,-1709.3749,5.6120,359.9725,53,1); // SAPD CAR
    SAPDFahrzeuge[9] = AddStaticVehicleEx(596,1595.6669,-1709.3191,5.6108,359.6060,53,1); // SAPD CAR
    SAPDFahrzeuge[10] = AddStaticVehicleEx(599,1600.6670,-1688.0149,6.0800,92.1944,53,1); // SAPD CAR
    SAPDFahrzeuge[11] = AddStaticVehicleEx(599,1600.6714,-1683.9897,6.0848,89.2017,53,1); // SAPD CAR
    SAPDFahrzeuge[12] = AddStaticVehicleEx(599,1600.8208,-1691.8602,6.0804,89.4661,53,1); // SAPD CAR
    SAPDFahrzeuge[13] = AddStaticVehicleEx(523,1600.0197,-1677.9089,5.4644,90.1036,53,1); // SAPD CAR
    SAPDFahrzeuge[14] = AddStaticVehicleEx(523,1600.0638,-1675.9818,5.4625,87.0820,53,1); // SAPD CAR
    SAPDFahrzeuge[15] = AddStaticVehicleEx(523,1600.0940,-1673.8547,5.4635,86.0042,53,1); // SAPD CAR
    SAPDFahrzeuge[16] = AddStaticVehicleEx(523,1599.9312,-1671.4951,5.4666,89.2680,53,1); // SAPD CAR
    SAPDFahrzeuge[17] = AddStaticVehicleEx(497,1559.9485,-1618.3555,13.6803,134.6420,53,1); // SAPD CAR
    SAPDFahrzeuge[18] = AddStaticVehicleEx(497,1575.4569,-1619.9943,13.7244,126.1852,53,1); // SAPD CAR
    SAPDFahrzeuge[19] = AddStaticVehicleEx(427,1585.2632,-1671.6749,6.0261,269.9033,53,1); // SAPD CAR
    SAPDFahrzeuge[20] = AddStaticVehicleEx(427,1585.3148,-1667.7789,6.0241,269.2581,53,1); // SAPD CAR
    SAPDFahrzeuge[21] = AddStaticVehicleEx(601,1585.5078,-1677.6804,5.6549,270.7735,53,1); // SAPD CAR

  • Danke hat geklappt.


    Jez noch zu den einem Error :S


    Der Error: C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(375) : error 017: undefined symbol "vehicleid"
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(384) : warning 217: loose indentation


    Die Zeile:


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    if(GetPlayerVehicleID(playerid) == SAPDFahrzeug(vehicleid)
    {
    if(!isPlayerInFrakt(playerid,1))return SendClientMessage(playerid,Grau,"Du bist kein Beamter.");
    {
    SendClientMessage(playerid,Grau,"Du bist kein Beamter");
    RemovePlayerFromVehicle(playerid);
    }
    }
    }
    return 1;
    }

  • if(newstate==PLAYER_STATE_DRIVER)
    {
    for(new i=0; i<sizeof(SAPDFahrzeug); i++)
    {
    if(GetPlayerVehicleID(playerid)==SAPDFahrzeug[i])
    {
    if(isPlayerInFrakt(playerid,1))
    {
    return 1;
    }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,FARBECODE,"Du bist kein Polizist");
    return 1;
    }
    }
    }
    }


    //E fehler.. - " vergessen xd

  • 5 Errors :s


    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(375) : error 072: "sizeof" operator is invalid on "function" symbols
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(377) : error 028: invalid subscript (not an array or too many subscripts): "SAPDFahrzeug"
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(377) : warning 215: expression has no effect
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(377) : error 001: expected token: ";", but found "]"
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(377) : error 029: invalid expression, assumed zero
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(377) : fatal error 107: too many error messages on one line


    Public:


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate==PLAYER_STATE_DRIVER)
    {
    for(new i=0; i<sizeof(SAPDFahrzeug); i++)
    {
    if(GetPlayerVehicleID(playerid)==SAPDFahrzeug[i])
    {
    if(isPlayerInFrakt(playerid,1))
    {
    return 1;
    }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,Grau,"Du bist kein Polizist");
    return 1;
    }
    }
    }
    }
    return 1;
    }

  • //Edit


    Fertig


    Noch 3 Warnungen einrücken ist nicht meine Stärke.


    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(387) : warning 217: loose indentation
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(388) : warning 217: loose indentation
    C:\Users\Alex\Desktop\Testserver\gamemodes\Selfmade.pwn(393) : warning 217: loose indentation


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate==PLAYER_STATE_DRIVER)
    {
    for(new i=0; i<sizeof(SAPDFahrzeuge); i++)
    {
    if(GetPlayerVehicleID(playerid)==SAPDFahrzeuge[i])
    {
    if(isPlayerInFrakt(playerid,1))
    {
    return 1;
    }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,Grau,"Du bist kein Polizist");
    return 1;
    }
    }
    }
    }
    return 1;
    }

  • Kleine Frage noch.


    Kann man das machen das der Spieler gar nicht erst ins Car einsteigen kann?


    Gruß

  • Könntest du mir da ein kleines Tut für machen?


    Gruß