Frage zum Tacho

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 Leute.. habe ein Probelm....




    // Fahrzeug Namen


    #define MAX_PLAYERS
    #define GetPlayerState
    #define GetPlayerVehicleID
    #define GetPlayerPos
    #define PLAYER_STATE_DRIVER
    #define IsPlayerConnected


    new VehicleName[][] = {
    "Landstalker",
    "Bravura",
    "Buffalo",
    "Linerunner",
    "Pereniel",
    "Sentinel",
    "Dumper",
    "Firetruck",
    "Trashmaster",
    "Stretch",
    "Manana",
    "Infernus",
    "Voodoo",
    "Pony",
    "Mule",
    "Cheetah",
    "Ambulance",
    "Leviathan",
    "Moonbeam",
    "Esperanto",
    "Taxi",
    "Washington",
    "Bobcat",
    "Eiswagen",
    "BF Injection",
    "Hunter",
    "Premier",
    "Enforcer",
    "Securicar",
    "Banshee",
    "Predator",
    "Bus",
    "Rhino",
    "Barracks",
    "Hotknife",
    "Trailer",
    "Previon",
    "Coach",
    "Cabbie",
    "Stallion",
    "Rumpo",
    "RC Bandit",
    "Romero",
    "Packer",
    "Monster Truck",
    "Admiral",
    "Squalo",
    "Seasparrow",
    "Pizzaboy",
    "Tram",
    "Trailer",
    "Turismo",
    "Speeder",
    "Reefer",
    "Tropic",
    "Flatbed",
    "Yankee",
    "Caddy",
    "Solair",
    "Berkley's RC Van",
    "Skimmer",
    "PCJ-600",
    "Roller",
    "Freeway",
    "RC Baron",
    "RC Raider",
    "Glendale",
    "Oceanic",
    "Sanchez",
    "Sparrow",
    "Patriot",
    "Quad",
    "Coastguard",
    "Dinghy",
    "Hermes",
    "Sabre",
    "Rustler",
    "ZR-350",
    "Walton",
    "Regina",
    "Comet",
    "Fahrrad",
    "Burrito",
    "Camper",
    "Marquis",
    "Baggage",
    "Dozer",
    "Maverick",
    "News Chopper",
    "Rancher",
    "FBI Rancher",
    "Virgo",
    "Greenwood",
    "Jetmax",
    "Hotring",
    "Sandking",
    "Blista Compact",
    "Police Maverick",
    "Boxville",
    "Benson",
    "Mesa",
    "RC Goblin",
    "Hotring Racer",
    "Hotring Racer",
    "Bloodring Banger",
    "Rancher",
    "Super GT",
    "Elegant",
    "Journey",
    "Bike",
    "Mountain Bike",
    "Beagle",
    "Cropdust",
    "Stunt",
    "Tanker",
    "RoadTrain",
    "Nebula",
    "Majestic",
    "Buccaneer",
    "Shamal",
    "Hydra",
    "FCR-900",
    "NRG-500",
    "HPV1000",
    "Cement Truck",
    "Tow Truck",
    "Fortune",
    "Cadrona",
    "FBI Truck",
    "Willard",
    "Forklift",
    "Tractor",
    "Combine",
    "Feltzer",
    "Remington",
    "Slamvan",
    "Blade",
    "Freight",
    "Streak",
    "Vortex",
    "Vincent",
    "Bullet",
    "Clover",
    "Sadler",
    "Firetruck",
    "Hustler",
    "Intruder",
    "Primo",
    "Cargobob",
    "Tampa",
    "Sunrise",
    "Merit",
    "Utility",
    "Nevada",
    "Yosemite",
    "Windsor",
    "Monster Truck",
    "Monster Truck",
    "Uranus",
    "Jester",
    "Sultan",
    "Stratum",
    "Elegy",
    "Raindance",
    "RC Tiger",
    "Flash",
    "Tahoma",
    "Savanna",
    "Bandito",
    "Freight",
    "Trailer",
    "Kart",
    "Mower",
    "Duneride",
    "Sweeper",
    "Broadway",
    "Tornado",
    "AT-400",
    "DFT-30",
    "Huntley",
    "Stafford",
    "BF-400",
    "Newsvan",
    "Tug",
    "Trailer",
    "Emperor",
    "Wayfarer",
    "Euros",
    "Hotdog",
    "Club",
    "Trailer",
    "Trailer",
    "Andromada",
    "Dodo",
    "RC Cam",
    "Launch",
    "Streifenwagen(LS)",
    "Streifenwagen(SF)",
    "Streifenwagen(LV)",
    "Polizei Ranger",
    "Picador",
    "S.W.A.T. Van",
    "Alpha",
    "Phoenix",
    "Glendale",
    "Sadler",
    "Luggage Trailer",
    "Luggage Trailer",
    "Stair Trailer",
    "Boxville",
    "Farm Plow",
    "Utility Trailer"
    };


    // Callback
    SetTimer("VehStateCheck",300,1);


    forward VehStateCheck();
    public VehStateCheck()
    {
    for(new i=0;i<MAX_PLAYERS;i++);
    {
    if (GetPlayerState(i) == PLAYER_STATE_DRIVER && IsPlayerConnected(i))
    {
    new Float:health,vehicleid = GetPlayerVehicleID(i),string[256],Float:value,Float:distance,Float:x,Float:y,Float:z;
    GetPlayerPos(i, x, y, z);
    distance = floatsqroot(floatpower(floatabs(floatsub(x,PCarPos[i][PCarX])),2)+floatpower(floatabs(floatsub(y,PCarPos[i][PCarY])),2)+floatpower(floatabs(floatsub(z,PCarPos[i][PCarZ])),2));
    value = floatround(distance * 11000);
    GetVehicleHealth(vehicleid,health);
    pSpeed[i] = floatround(value/1400);
    if (health >= 800 && health <= 1000)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~%d~g~ KM/H~n~~w~%d ~b~/~w~ 100~r~ Benzin~n~~g~~h~%s",floatround(value/1400),Gas[vehicleid],VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,3);
    }
    else if (health >= 600 && health < 800)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~%d~g~ KM/H~n~~w~%d ~b~/~w~ 100~r~ Benzin~n~~g~%s",floatround(value/1400),Gas[vehicleid],VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,3);
    }
    else if (health >= 301 && health < 600)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~%d~g~ KM/H~n~~w~%d ~b~/~w~ 100~r~ Benzin~n~~y~%s",floatround(value/1400),Gas[vehicleid],VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,3);
    }
    else if (health >= 0 && health < 301)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~%d~g~ KM/H~n~~w~%d ~b~/~w~ 100~r~ Benzin~n~~r~%s",floatround(value/1400),Gas[vehicleid],VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,3);
    }


    PCarPos[i][PCarX] = x;
    PCarPos[i][PCarY] = y;
    PCarPos[i][PCarZ] = z;
    }
    }
    return 1;
    }






    dann kommt das:


    C:\Users\Christian\Desktop\tacho1.pwn(227) : error 010: invalid function or declaration
    C:\Users\Christian\Desktop\tacho1.pwn(232) : error 029: invalid expression, assumed zero
    C:\Users\Christian\Desktop\tacho1.pwn(232) : error 036: empty statement
    C:\Users\Christian\Desktop\tacho1.pwn(234) : error 017: undefined symbol "i"
    C:\Users\Christian\Desktop\tacho1.pwn(234) : error 017: undefined symbol "i"
    C:\Users\Christian\Desktop\tacho1.pwn(234) : error 029: invalid expression, assumed zero
    C:\Users\Christian\Desktop\tacho1.pwn(234) : 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.



    Kann mir da vll jeamdn weiterhelfen?

    70% der Breadfish Mitglieder sind kiddys, wenn du mir auch zustimmst dann kopiere diesen Text in deine Signatur! ^^

  • C:\Users\Christian\Desktop\tacho1.pwn(227)


    Das ist immer die Zeile in die der Fehler ist.. und die stehen oben im script daneben?!

    70% der Breadfish Mitglieder sind kiddys, wenn du mir auch zustimmst dann kopiere diesen Text in deine Signatur! ^^