Fraki Cars gib erro aus :(

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 Ich Will Mir Für LVPDs Frakicar Script


    Sry Ich Habe LRS


    Error
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(147) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(148) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(149) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(150) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(151) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(152) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(153) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(154) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(155) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(156) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(157) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(158) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(159) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(160) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(161) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(162) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(163) : warning 202: number of arguments does not match definition
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(306) : error 029: invalid expression, assumed zero
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(306 -- 307) : warning 215: expression has no effect
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(307) : error 001: expected token: ")", but found "if"
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(307) : error 033: array must be indexed (variable "lvpdcars")
    C:\Users\Dominik\Desktop\Samp Scripter Server\gamemodes\Reallife.pwn(307) : 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.

    Code


    new lvpdcars[17];




    lvpdcars[0]= CreateVehicle(598,2298.5107,2464.4937,3.0195,90.1594,0,1); // pd1
    lvpdcars[1]= CreateVehicle(598,2298.5417,2460.4202,3.0223,91.1702,0,1); // pd2
    lvpdcars[2]= CreateVehicle(598,2298.5229,2456.0059,3.0197,90.7213,0,1); // pd3
    lvpdcars[3]= CreateVehicle(598,2297.8162,2452.1167,3.0188,91.2790,0,1); // pd4
    lvpdcars[4]= CreateVehicle(598,2303.3611,2432.1182,3.0216,180.6378,0,1); // pd5
    lvpdcars[5]= CreateVehicle(598,2299.0190,2431.8076,3.0182,180.5982,0,1); // pd6
    lvpdcars[6]= CreateVehicle(598,2294.7161,2431.4709,3.0232,180.7642,0,1); // pd7
    lvpdcars[7]= CreateVehicle(598,2290.2603,2430.9036,3.0177,178.0800,0,1); // pd8
    lvpdcars[8]= CreateVehicle(598,2285.9900,2430.7668,3.0174,179.4446,0,1); // pd9
    lvpdcars[9]= CreateVehicle(598,2272.9539,2430.5793,3.0199,176.6182,0,1); // pd10
    lvpdcars[10]= CreateVehicle(598,2268.7329,2430.6289,3.0191,179.0087,0,1); // pd1!
    lvpdcars[11]= CreateVehicle(598,2268.7329,2430.6289,3.0191,179.0086,0,1); // pd11
    lvpdcars[12]= CreateVehicle(598,2264.2891,2430.8237,3.0183,180.8949,0,1); // pd12
    lvpdcars[13]= CreateVehicle(598,2259.6370,2431.0901,3.0192,180.3304,0,1); // pd13
    lvpdcars[14]= CreateVehicle(598,2255.5979,2431.9768,3.0180,180.3810,0,1); // pd14
    lvpdcars[15]= CreateVehicle(598,2250.8662,2431.6411,3.0187,177.7157,0,1); // pd15
    lvpdcars[16]= CreateVehicle(598,2246.3606,2430.8640,3.0160,181.3229,0,1); // pd16


    if(newstate == PLAYER_STATE_DRIVER)
    {
    for(new i = 16; i<sizeof(lvpdcars);
    }
    if(GetPlayerVehicleID(playerid) == lvpdcars);
    {
    if(Spieler[playerid][Fraktion] == 1)
    }
    {
    else
    SCM(playerid,WES,"Du Bist Keine LVPD");
    RemovePlayerFromVehicle(playerid);

  • CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay);
    und jetzt guck mal deine parameter an.


    //edit

    if(newstate == PLAYER_STATE_DRIVER)
    {
    for(new i; i<sizeof(lvpdcars);i++)
    {
    if(GetPlayerVehicleID(playerid) == lvpdcars[i])
    {
    if(Spieler[playerid][Fraktion] != 1)return RemovePlayerFromVehicle(playerid),SCM(playerid,WES,"Du Bist Keine LVPD");
    }
    }
    }


    //edit Noch mehr Fehler behoben,sry :)

  • Naja bearbeite am besten deine Schleife.
    Vo 16 anzufangen, wenn es 16/17 ist ?
    Dann fängt er nähmlich erst von FrakCar 16 an zu zählen.


    Deswegen:


    if(newstate == PLAYER_STATE_DRIVER){
    for(new i; i<sizeof(lvpdcars);i++){
    if(GetPlayerVehicleID(playerid) == lvpdcars[i])
    if(Spieler[playerid][Fraktion] != 1)return RemovePlayerFromVehicle(playerid),SCM(playerid,WES,"Du Bist Keine LVPD");
    }
    }


    Und ich würde die Anzahl von den Frakcars Minimal erweitern, falls du mal nachschub brauchst :thumbup: